From 03ceaca19c06732381b39d5353f05d1d1805199d Mon Sep 17 00:00:00 2001 From: Frank Praznik Date: Sun, 19 Apr 2026 23:31:00 -0400 Subject: [PATCH] wayland: Calculate the fullscreen exclusive pointer scale from the viewport dimensions Fixes the pointer scale when using the aspect-correct scaling mode. --- src/video/wayland/SDL_waylandwindow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c index 20da36b633..43ccce42e7 100644 --- a/src/video/wayland/SDL_waylandwindow.c +++ b/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) {