equal
deleted
inserted
replaced
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. |
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 |
22 // The game camera in the Alpha for 0.9.23 screwed up if |
23 // screwed up if the game started with the mouse already being |
23 // the game started with the mouse already being centered. |
24 // centered. |
24 // This fixes it, but we might have overlooked a related |
|
25 // bug somewhere else. |
25 // No big deal since this function is (so far) only called once. |
26 // 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); |
27 SDL_WarpMouse((cScreenWidth div 2) + 1, cScreenHeight div 2); |
29 SDL_WarpMouse(cScreenWidth div 2, cScreenHeight div 2); |
28 SDL_WarpMouse(cScreenWidth div 2, cScreenHeight div 2); |
30 end; |
29 end; |
31 |
30 |
32 procedure updatePosition; |
31 procedure updatePosition; |