Parcourir la source

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

Fixes the pointer scale when using the aspect-correct scaling mode.
Frank Praznik il y a 4 mois
Parent
commit
03ceaca19c
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  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) {