diff options
| author | Mario Schlack | 2016-08-29 13:14:38 +0800 |
|---|---|---|
| committer | Rémi Verschelde | 2016-09-01 08:46:03 +0200 |
| commit | 9ea76ff46daa428cb50715697732c173dbf994c4 (patch) | |
| tree | 47aca9cc177d80e76d23ed7a7a552f58e8d2497d /platform/windows/os_windows.cpp | |
| parent | cd6afd5f1d55a733ca759c2e8bb4aa6ea32800c1 (diff) | |
| download | godot-9ea76ff46daa428cb50715697732c173dbf994c4.tar.gz godot-9ea76ff46daa428cb50715697732c173dbf994c4.tar.zst godot-9ea76ff46daa428cb50715697732c173dbf994c4.zip | |
Hide the mouse cursor when MOUSE_MODE_CAPTURED is activated.
(cherry picked from commit f0b6a242cc1934fb15c53e3e1724451c397bcb8b)
Diffstat (limited to 'platform/windows/os_windows.cpp')
| -rw-r--r-- | platform/windows/os_windows.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 571277f91..cebafdabc 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -1364,7 +1364,9 @@ 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); } |
