equal
deleted
inserted
replaced
16 resetPosition(); |
16 resetPosition(); |
17 end; |
17 end; |
18 |
18 |
19 procedure resetPosition; |
19 procedure resetPosition; |
20 begin |
20 begin |
|
21 // Move curser by 1px in case it's already centered. |
|
22 // Due to switch to SDL2, the game camera in the Alpha for 0.9.23 |
|
23 // screwed up if the game started with the mouse already being |
|
24 // centered. |
|
25 // No big deal since this function is (so far) only called once. |
|
26 // This fixes it, but we might have overlooked an SDL2-related |
|
27 // bug somewhere else. |
|
28 SDL_WarpMouse((cScreenWidth div 2) + 1, cScreenHeight div 2); |
21 SDL_WarpMouse(cScreenWidth div 2, cScreenHeight div 2); |
29 SDL_WarpMouse(cScreenWidth div 2, cScreenHeight div 2); |
22 end; |
30 end; |
23 |
31 |
24 procedure updatePosition; |
32 procedure updatePosition; |
25 var x, y: LongInt; |
33 var x, y: LongInt; |