mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-18 12:05:14 -04:00
Fix on windows, if you release a mouse button outside the window (without switching focus to another window), it stays stuck in-game
This commit is contained in:
parent
42ad34124d
commit
9bb7065f74
@ -533,6 +533,11 @@ static LRESULT CALLBACK Window_Procedure(HWND handle, UINT message, WPARAM wPara
|
||||
break;
|
||||
|
||||
case WM_MOUSEMOVE:
|
||||
/* Set before position change, in case mouse buttons changed when outside window */
|
||||
Input_SetPressed(KEY_LMOUSE, (wParam & 0x01) != 0);
|
||||
Input_SetPressed(KEY_RMOUSE, (wParam & 0x02) != 0);
|
||||
Input_SetPressed(KEY_MMOUSE, (wParam & 0x10) != 0);
|
||||
/* TODO: do we need to set XBUTTON1/XBUTTON2 here */
|
||||
Pointer_SetPosition(0, LOWORD(lParam), HIWORD(lParam));
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user