1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Restrict relative mouse mode to Wayland users (#15697)

This commit is contained in:
sfan5 2025-01-26 19:16:46 +01:00 committed by GitHub
parent 282c81fe3a
commit 45c5ef8798
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 25 additions and 2 deletions

View file

@ -1248,6 +1248,15 @@ bool CIrrDeviceSDL::supportsTouchEvents() const
return true;
}
//! Checks whether windowing uses the Wayland protocol.
bool CIrrDeviceSDL::isUsingWayland() const
{
if (!Window)
return false;
auto *name = SDL_GetCurrentVideoDriver();
return name && !strcmp(name, "wayland");
}
//! returns if window is active. if not, nothing need to be drawn
bool CIrrDeviceSDL::isWindowActive() const
{