diff options
author | George Marques <george@gmarqu.es> | 2016-10-20 20:01:28 -0200 |
---|---|---|
committer | George Marques <george@gmarqu.es> | 2016-10-20 20:01:28 -0200 |
commit | 414d58e6c0ab8d3a75206127fac8e2b80cc67f29 (patch) | |
tree | 5051ea592a6a9bb6103b1c982af0c4b246bfb649 /platform | |
parent | c23e8797f1bec30defd1903cfeef0992cb1f1a89 (diff) |
Fix the hiding of mouse cursor before interaction
Fix part of #6633
Diffstat (limited to 'platform')
-rw-r--r-- | platform/windows/os_windows.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 38e738a414..286f5fb0b7 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -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{ |