浏览代码

Merge pull request #6321 from hurikhan/fix_windows_mousemode

Windows: Hide the mouse cursor when MOUSE_MODE_CAPTURED is activated.
Rémi Verschelde 9 年之前
父节点
当前提交
c826ae1566
共有 1 个文件被更改,包括 2 次插入0 次删除
  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);
 	}