mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 19:38:14 +00:00
wayland: Scale-to-display mode requires both viewports and xdg-output for proper functionality
This commit is contained in:
@@ -1366,11 +1366,17 @@ bool Wayland_VideoInit(SDL_VideoDevice *_this)
|
|||||||
// First roundtrip to receive all registry objects.
|
// First roundtrip to receive all registry objects.
|
||||||
WAYLAND_wl_display_roundtrip(data->display);
|
WAYLAND_wl_display_roundtrip(data->display);
|
||||||
|
|
||||||
// Require viewports for display scaling.
|
// Require viewports and xdg-output for display scaling.
|
||||||
if (data->scale_to_display_enabled && !data->viewporter) {
|
if (data->scale_to_display_enabled) {
|
||||||
|
if (!data->viewporter) {
|
||||||
SDL_LogError(SDL_LOG_CATEGORY_VIDEO, "wayland: Display scaling requires the missing 'wp_viewporter' protocol: disabling");
|
SDL_LogError(SDL_LOG_CATEGORY_VIDEO, "wayland: Display scaling requires the missing 'wp_viewporter' protocol: disabling");
|
||||||
data->scale_to_display_enabled = false;
|
data->scale_to_display_enabled = false;
|
||||||
}
|
}
|
||||||
|
if (!data->xdg_output_manager) {
|
||||||
|
SDL_LogError(SDL_LOG_CATEGORY_VIDEO, "wayland: Display scaling requires the missing 'zxdg_output_manager_v1' protocol: disabling");
|
||||||
|
data->scale_to_display_enabled = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Now that we have all the protocols, load libdecor if applicable
|
// Now that we have all the protocols, load libdecor if applicable
|
||||||
Wayland_LoadLibdecor(data, false);
|
Wayland_LoadLibdecor(data, false);
|
||||||
|
Reference in New Issue
Block a user