_x11 fixes
This commit is contained in:
@@ -1602,6 +1602,11 @@ void SDLPlatform::SetHighDpiAwarenessEnabled(bool enable)
|
||||
|
||||
bool SDLPlatform::UsesWayland()
|
||||
{
|
||||
if (xDisplay == nullptr && WaylandDisplay == nullptr)
|
||||
{
|
||||
// In case the X11 display pointer has not been updated yet
|
||||
return strcmp(SDL_GetCurrentVideoDriver(), "wayland") == 0;
|
||||
}
|
||||
return WaylandDisplay != nullptr;
|
||||
}
|
||||
|
||||
@@ -1617,6 +1622,11 @@ bool SDLPlatform::UsesXWayland()
|
||||
|
||||
bool SDLPlatform::UsesX11()
|
||||
{
|
||||
if (xDisplay == nullptr && WaylandDisplay == nullptr)
|
||||
{
|
||||
// In case the X11 display pointer has not been updated yet
|
||||
return strcmp(SDL_GetCurrentVideoDriver(), "x11") == 0;
|
||||
}
|
||||
return xDisplay != nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user