From 598a48ec50ce6f2c15864e912f10ac6e664924ae Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Mon, 24 Feb 2020 20:33:33 -0800 Subject: [PATCH] Remove the Wayland mouse capture hack that is not necessary on SDL 2.0.11 --- app/streaming/session.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/streaming/session.cpp b/app/streaming/session.cpp index 85327fdb..0cb178c6 100644 --- a/app/streaming/session.cpp +++ b/app/streaming/session.cpp @@ -1083,11 +1083,13 @@ void Session::exec(int displayOriginX, int displayOriginY) // This prevents the mouse from becoming trapped inside // Moonlight when it's halted at a debug break. if (m_Preferences->windowMode != StreamingPreferences::WM_WINDOWED) { +#if !SDL_VERSION_ATLEAST(2, 0, 11) // HACK: This doesn't work on Wayland until we render a frame, so - // just don't do it for now. + // just don't do it for now. This bug is fixed in SDL 2.0.11. if (strcmp(SDL_GetCurrentVideoDriver(), "wayland") != 0) { m_InputHandler->setCaptureActive(true); } +#endif } #endif