mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-29 20:57:59 +08:00
Log information about Wayland environment detection
This commit is contained in:
@@ -495,6 +495,9 @@ static bool Wayland_IsPreferred(struct wl_display *display)
|
|||||||
|
|
||||||
wl_registry_destroy(registry);
|
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;
|
return preferred_data.has_fifo_v1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -285,6 +285,8 @@ static SDL_VideoDevice *X11_CreateDevice(void)
|
|||||||
|
|
||||||
data->is_xwayland = X11_IsXWayland(x11_display);
|
data->is_xwayland = X11_IsXWayland(x11_display);
|
||||||
if (data->is_xwayland) {
|
if (data->is_xwayland) {
|
||||||
|
SDL_LogInfo(SDL_LOG_CATEGORY_VIDEO, "Detected XWayland");
|
||||||
|
|
||||||
device->device_caps |= VIDEO_DEVICE_CAPS_MODE_SWITCHING_EMULATED |
|
device->device_caps |= VIDEO_DEVICE_CAPS_MODE_SWITCHING_EMULATED |
|
||||||
VIDEO_DEVICE_CAPS_DISABLE_MOUSE_WARP_ON_FULLSCREEN_TRANSITIONS;
|
VIDEO_DEVICE_CAPS_DISABLE_MOUSE_WARP_ON_FULLSCREEN_TRANSITIONS;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user