summaryrefslogtreecommitdiffstats
path: root/src/core/Frontend.cpp
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2020-11-16 13:28:10 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2020-11-16 13:28:10 +0100
commit3b1debaa0d5341bdb954654503424fb12b529894 (patch)
tree5edcb5ae70080282c2a581a0f53824479daeff0e /src/core/Frontend.cpp
parentMerge pull request #723 from myfreeweb/master (diff)
downloadre3-3b1debaa0d5341bdb954654503424fb12b529894.tar
re3-3b1debaa0d5341bdb954654503424fb12b529894.tar.gz
re3-3b1debaa0d5341bdb954654503424fb12b529894.tar.bz2
re3-3b1debaa0d5341bdb954654503424fb12b529894.tar.lz
re3-3b1debaa0d5341bdb954654503424fb12b529894.tar.xz
re3-3b1debaa0d5341bdb954654503424fb12b529894.tar.zst
re3-3b1debaa0d5341bdb954654503424fb12b529894.zip
Diffstat (limited to 'src/core/Frontend.cpp')
-rw-r--r--src/core/Frontend.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index 4be23b77..ffcd8b30 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -5529,8 +5529,15 @@ CMenuManager::SwitchMenuOnAndOff()
gMusicPlaying = 0;
}
*/
- if (m_bMenuActive != menuWasActive)
+ if (m_bMenuActive != menuWasActive) {
m_bMenuStateChanged = true;
+
+ // Keep mouse centered while in game. Done in main.cpp in other conditions.
+ // IMPROVED_VIDEOMODE because otherwise there is no way for windowed mode.
+#if defined(RW_GL3) && defined(IMPROVED_VIDEOMODE)
+ glfwSetInputMode(PSGLOBAL(window), GLFW_CURSOR, m_bMenuActive && m_nPrefsWindowed ? GLFW_CURSOR_HIDDEN : GLFW_CURSOR_DISABLED);
+#endif
+ }
m_bStartUpFrontEndRequested = false;
m_bShutDownFrontEndRequested = false;