Commit 768b6728bdd56f6d9e1e96d05beb330d0a6f4572

Frank Praznik 2022-09-04T23:39:05

wayland: Compare against the old scale when resizing Compare against the old scale instead of the new or the conditional will always be true.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c
index dee6520..cdf4085 100644
--- a/src/video/wayland/SDL_waylandwindow.c
+++ b/src/video/wayland/SDL_waylandwindow.c
@@ -2109,7 +2109,7 @@ Wayland_HandleResize(SDL_Window *window, int width, int height, float scale)
     SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
     SDL_VideoData *viddata = data->waylandData;
     int old_w = window->w, old_h = window->h;
-    float old_scale = scale;
+    float old_scale = data->scale_factor;
 
     /* Update the window geometry. */
     window->w = width;