Browse Source

Hide the mouse cursor when MOUSE_MODE_CAPTURED is activated.

Mario Schlack 9 năm trước cách đây
mục cha
commit
f0b6a242cc
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      platform/windows/os_windows.cpp

+ 2 - 0
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);
 	}