From 83b81aad4b0c10f26caa112c877536872808cc9b Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 22 Jul 2018 16:21:15 -0700 Subject: [PATCH] Don't capture the mouse initially on debug builds --- app/streaming/session.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/streaming/session.cpp b/app/streaming/session.cpp index ee1d761d..f8ea6f8b 100644 --- a/app/streaming/session.cpp +++ b/app/streaming/session.cpp @@ -615,8 +615,12 @@ void Session::exec() SDL_SetWindowSize(m_Window, width, height); } - // Capture the mouse +#ifndef QT_DEBUG + // Capture the mouse by default on release builds only. + // This prevents the mouse from becoming trapped inside + // Moonlight when it's halted at a debug break. SDL_SetRelativeMouseMode(SDL_TRUE); +#endif // Disable the screen saver SDL_DisableScreenSaver();