Merge pull request #6321 from hurikhan/fix_windows_mousemode

Windows: Hide the mouse cursor when MOUSE_MODE_CAPTURED is activated.
This commit is contained in:
Rémi Verschelde 2016-08-31 08:04:07 +02:00 committed by GitHub
commit c826ae1566
1 changed files with 2 additions and 0 deletions

View File

@ -1364,7 +1364,9 @@ void OS_Windows::set_mouse_mode(MouseMode p_mode) {
POINT pos = { (int) center.x, (int) center.y }; POINT pos = { (int) center.x, (int) center.y };
ClientToScreen(hWnd, &pos); ClientToScreen(hWnd, &pos);
SetCursorPos(pos.x, pos.y); SetCursorPos(pos.x, pos.y);
ShowCursor(false);
} else { } else {
ShowCursor(true);
ReleaseCapture(); ReleaseCapture();
ClipCursor(NULL); ClipCursor(NULL);
} }