Hide the mouse cursor when MOUSE_MODE_CAPTURED is activated.

(cherry picked from commit f0b6a242cc)
This commit is contained in:
Mario Schlack 2016-08-29 13:14:38 +08:00 committed by Rémi Verschelde
parent cd6afd5f1d
commit 9ea76ff46d

View file

@ -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);
}