Log information about Wayland environment detection

This commit is contained in:
Sam Lantinga
2025-04-25 09:48:08 -07:00
parent 5b1e92ae88
commit 7642c0468d
2 changed files with 5 additions and 0 deletions

View File

@@ -495,6 +495,9 @@ static bool Wayland_IsPreferred(struct wl_display *display)
wl_registry_destroy(registry);
if (!preferred_data.has_fifo_v1) {
SDL_LogInfo(SDL_LOG_CATEGORY_VIDEO, "This compositor lacks support for the fifo-v1 protocol; falling back to XWayland for GPU performance reasons (set SDL_VIDEO_DRIVER=wayland to override)");
}
return preferred_data.has_fifo_v1;
}

View File

@@ -285,6 +285,8 @@ static SDL_VideoDevice *X11_CreateDevice(void)
data->is_xwayland = X11_IsXWayland(x11_display);
if (data->is_xwayland) {
SDL_LogInfo(SDL_LOG_CATEGORY_VIDEO, "Detected XWayland");
device->device_caps |= VIDEO_DEVICE_CAPS_MODE_SWITCHING_EMULATED |
VIDEO_DEVICE_CAPS_DISABLE_MOUSE_WARP_ON_FULLSCREEN_TRANSITIONS;
}