Fix the hiding of mouse cursor before interaction

Fix part of #6633
This commit is contained in:
George Marques 2016-10-20 20:01:28 -02:00
parent c23e8797f1
commit 414d58e6c0
No known key found for this signature in database
GPG key ID: 046BD46A3201E43D

View file

@ -1366,13 +1366,16 @@ void OS_Windows::set_mouse_mode(MouseMode p_mode) {
POINT pos = { (int) center.x, (int) center.y };
ClientToScreen(hWnd, &pos);
SetCursorPos(pos.x, pos.y);
ShowCursor(false);
} else {
ShowCursor(true);
ReleaseCapture();
ClipCursor(NULL);
}
if (p_mode == MOUSE_MODE_CAPTURED || p_mode == MOUSE_MODE_HIDDEN) {
hCursor = SetCursor(NULL);
} else {
SetCursor(hCursor);
}
}
OS_Windows::MouseMode OS_Windows::get_mouse_mode() const{