1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00

Fix C&C scrolling issue, the screen edges were one pixel off

This commit is contained in:
Toni Spets 2010-11-08 17:49:09 +02:00
parent 7a3086a3df
commit 4849f3de54

4
main.c
View File

@ -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.y < 0) ddraw->cursor.y = 0;
if(ddraw->cursor.x > ddraw->width) ddraw->cursor.x = ddraw->width;
if(ddraw->cursor.y > ddraw->height) ddraw->cursor.y = ddraw->height;
if(ddraw->cursor.x > ddraw->width-1) ddraw->cursor.x = ddraw->width-1;
if(ddraw->cursor.y > ddraw->height-1) ddraw->cursor.y = ddraw->height-1;
SetCursorPos(ddraw->center.x, ddraw->center.y);
}