1
0
Fork 0
mirror of https://github.com/halpz/re3.git synced 2024-12-25 18:05:27 +00:00

Use GLFW_CURSOR_DISABLED (glfw's native mouse restriction)

On Wayland, clients cannot move the mouse pointer.
Mouse constraints, as required for 3D camera movement, are an explicit specific thing,
and glfw supports it with GLFW_CURSOR_DISABLED.
Use DISABLED, unless we're in a menu in windowed mode, where HIDDEN is still appropriate.
This commit is contained in:
Greg V 2020-09-28 04:53:15 +03:00 committed by erorcun
parent 7c1497a058
commit 1544acff05

View file

@ -1670,6 +1670,8 @@ main(int argc, char *argv[])
#endif #endif
{ {
glfwPollEvents(); glfwPollEvents();
glfwSetInputMode(PSGLOBAL(window), GLFW_CURSOR,
(FrontEndMenuManager.m_bMenuActive && !PSGLOBAL(fullScreen)) ? GLFW_CURSOR_HIDDEN : GLFW_CURSOR_DISABLED);
if( ForegroundApp ) if( ForegroundApp )
{ {
switch ( gGameState ) switch ( gGameState )