[uwac] output: take a max scale into scaling code

Fix for a hybrid multimonitor configurations:
Previous code was working for me because the display with scale=2
was last on the wayland display list. After restarting it was earlier.
To fix this - just take the highest scale provided by a display.
Similar as eg. here the SDL is doing:
b5bc64aa55/src/video/wayland/SDL_waylandwindow.c (L1170)
This commit is contained in:
Mariusz Bialonczyk 2024-01-11 07:39:01 +01:00 committed by akallabeth
parent 26017c71bd
commit 4c17dfb71d

View File

@ -88,7 +88,9 @@ static void output_handle_scale(void* data, struct wl_output* wl_output, int32_t
UwacOutput* output = data; UwacOutput* output = data;
assert(output); assert(output);
output->display->actual_scale = output->scale = scale; output->scale = scale;
if (scale > output->display->actual_scale)
output->display->actual_scale = scale;
} }
static void output_handle_name(void* data, struct wl_output* wl_output, const char* name) static void output_handle_name(void* data, struct wl_output* wl_output, const char* name)