mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-15 21:22:40 +00:00
Capture the mouse by default always on release builds and in absolute mode for debug builds
This commit is contained in:
@@ -1115,11 +1115,13 @@ void Session::exec(int displayOriginX, int displayOriginY)
|
|||||||
|
|
||||||
bool needsFirstEnterCapture = false;
|
bool needsFirstEnterCapture = false;
|
||||||
|
|
||||||
|
// Capture the mouse in relative mode by default on release builds only.
|
||||||
|
// This prevents the mouse from becoming trapped inside Moonlight when
|
||||||
|
// it's halted at a debug break.
|
||||||
#ifndef QT_DEBUG
|
#ifndef QT_DEBUG
|
||||||
// Capture the mouse by default on release builds only.
|
if (prefs.absoluteMouseMode)
|
||||||
// This prevents the mouse from becoming trapped inside
|
#endif
|
||||||
// Moonlight when it's halted at a debug break.
|
{
|
||||||
if (m_Preferences->windowMode != StreamingPreferences::WM_WINDOWED) {
|
|
||||||
// HACK: For Wayland, we wait until we get the first SDL_WINDOWEVENT_ENTER
|
// HACK: For Wayland, we wait until we get the first SDL_WINDOWEVENT_ENTER
|
||||||
// event where it seems to work consistently on GNOME.
|
// event where it seems to work consistently on GNOME.
|
||||||
if (strcmp(SDL_GetCurrentVideoDriver(), "wayland") != 0) {
|
if (strcmp(SDL_GetCurrentVideoDriver(), "wayland") != 0) {
|
||||||
@@ -1129,7 +1131,6 @@ void Session::exec(int displayOriginX, int displayOriginY)
|
|||||||
needsFirstEnterCapture = true;
|
needsFirstEnterCapture = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// Stop text input. SDL enables it by default
|
// Stop text input. SDL enables it by default
|
||||||
// when we initialize the video subsystem, but this
|
// when we initialize the video subsystem, but this
|
||||||
|
|||||||
Reference in New Issue
Block a user