summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2020-11-16 13:49:00 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2020-11-16 13:49:00 +0100
commitf33ed2892a7a083d10c89b93b0122c6b4100a9a2 (patch)
tree7f34f758a54a6f03f8cef42a2c7497d63fcc2c04 /src/core
parentFix mouse lock/high-dpi (diff)
downloadre3-f33ed2892a7a083d10c89b93b0122c6b4100a9a2.tar
re3-f33ed2892a7a083d10c89b93b0122c6b4100a9a2.tar.gz
re3-f33ed2892a7a083d10c89b93b0122c6b4100a9a2.tar.bz2
re3-f33ed2892a7a083d10c89b93b0122c6b4100a9a2.tar.lz
re3-f33ed2892a7a083d10c89b93b0122c6b4100a9a2.tar.xz
re3-f33ed2892a7a083d10c89b93b0122c6b4100a9a2.tar.zst
re3-f33ed2892a7a083d10c89b93b0122c6b4100a9a2.zip
Diffstat (limited to '')
-rw-r--r--src/core/Frontend.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index ffcd8b30..b84b691d 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -5433,6 +5433,10 @@ CMenuManager::SetHelperText(int text)
void
CMenuManager::ShutdownJustMenu()
{
+ // In case we're windowed, keep mouse centered while in game. Done in main.cpp in other conditions.
+#if defined(RW_GL3) && defined(IMPROVED_VIDEOMODE)
+ glfwSetInputMode(PSGLOBAL(window), GLFW_CURSOR, GLFW_CURSOR_DISABLED);
+#endif
m_bMenuActive = false;
CTimer::EndUserPause();
}
@@ -5532,8 +5536,7 @@ CMenuManager::SwitchMenuOnAndOff()
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.
+ // In case we're windowed, keep mouse centered while in game. Done in main.cpp in other conditions.
#if defined(RW_GL3) && defined(IMPROVED_VIDEOMODE)
glfwSetInputMode(PSGLOBAL(window), GLFW_CURSOR, m_bMenuActive && m_nPrefsWindowed ? GLFW_CURSOR_HIDDEN : GLFW_CURSOR_DISABLED);
#endif