Jelajahi Sumber

wayland: Calculate the fullscreen exclusive pointer scale from the viewport dimensions

Fixes the pointer scale when using the aspect-correct scaling mode.
Frank Praznik 1 bulan lalu
induk
melakukan
03ceaca19c
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      src/video/wayland/SDL_waylandwindow.c

+ 2 - 2
src/video/wayland/SDL_waylandwindow.c

@@ -362,8 +362,8 @@ static void ConfigureWindowGeometry(SDL_Window *window)
                 data->current.logical_height = window->current_fullscreen_mode.h;
             }
 
-            data->pointer_scale.x = (double)window_width / (double)data->current.logical_width;
-            data->pointer_scale.y = (double)window_height / (double)data->current.logical_height;
+            data->pointer_scale.x = (double)window_width / (double)viewport_width;
+            data->pointer_scale.y = (double)window_height / (double)viewport_height;
         }
     } else {
         if (!data->scale_to_display) {