From 9ea76ff46daa428cb50715697732c173dbf994c4 Mon Sep 17 00:00:00 2001 From: Mario Schlack Date: Mon, 29 Aug 2016 13:14:38 +0800 Subject: [PATCH] Hide the mouse cursor when MOUSE_MODE_CAPTURED is activated. (cherry picked from commit f0b6a242cc1934fb15c53e3e1724451c397bcb8b) --- platform/windows/os_windows.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 571277f91e..cebafdabce 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); }