소스 검색

Put GLFW in relative mouse mode when the cursor is disabled. (#3874)

pull/3881/head
Jeffery Myers 9 달 전
committed by GitHub
부모
커밋
9bb3d9977a
No known key found for this signature in database GPG 키 ID: B5690EEEBB952194
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. +6
    -0
      src/platforms/rcore_desktop.c

+ 6
- 0
src/platforms/rcore_desktop.c 파일 보기

@ -972,6 +972,9 @@ void EnableCursor(void)
// Set cursor position in the middle
SetMousePosition(CORE.Window.screen.width/2, CORE.Window.screen.height/2);
if (glfwRawMouseMotionSupported())
glfwSetInputMode(platform.handle, GLFW_RAW_MOUSE_MOTION, GLFW_FALSE);
CORE.Input.Mouse.cursorHidden = false;
}
@ -983,6 +986,9 @@ void DisableCursor(void)
// Set cursor position in the middle
SetMousePosition(CORE.Window.screen.width/2, CORE.Window.screen.height/2);
if (glfwRawMouseMotionSupported())
glfwSetInputMode(platform.handle, GLFW_RAW_MOUSE_MOTION, GLFW_TRUE);
CORE.Input.Mouse.cursorHidden = true;
}

불러오는 중...
취소
저장