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