Fix C&C scrolling issue, the screen edges were one pixel off
This commit is contained in:
parent
7a3086a3df
commit
4849f3de54
1 changed files with 2 additions and 2 deletions
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.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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue