mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +01:00
Fix C&C scrolling issue, the screen edges were one pixel off
This commit is contained in:
parent
7a3086a3df
commit
4849f3de54
4
main.c
4
main.c
@ -223,8 +223,8 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
|
|
||||||
if(ddraw->cursor.x < 0) ddraw->cursor.x = 0;
|
if(ddraw->cursor.x < 0) ddraw->cursor.x = 0;
|
||||||
if(ddraw->cursor.y < 0) ddraw->cursor.y = 0;
|
if(ddraw->cursor.y < 0) ddraw->cursor.y = 0;
|
||||||
if(ddraw->cursor.x > ddraw->width) ddraw->cursor.x = ddraw->width;
|
if(ddraw->cursor.x > ddraw->width-1) ddraw->cursor.x = ddraw->width-1;
|
||||||
if(ddraw->cursor.y > ddraw->height) ddraw->cursor.y = ddraw->height;
|
if(ddraw->cursor.y > ddraw->height-1) ddraw->cursor.y = ddraw->height-1;
|
||||||
|
|
||||||
SetCursorPos(ddraw->center.x, ddraw->center.y);
|
SetCursorPos(ddraw->center.x, ddraw->center.y);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user