render: GetRenderViewportSize shouldn't scale viewport dimensions.

These are already scaled for the logical presentation (unless using the pixel
dimensions instead; we still scale those here).

Fixes #11704.
This commit is contained in:
Ryan C. Gordon
2025-01-08 14:42:01 -05:00
parent 1636009511
commit fa7a529912

View File

@@ -3007,13 +3007,13 @@ static void GetRenderViewportSize(SDL_Renderer *renderer, SDL_FRect *rect)
rect->y = 0.0f;
if (view->viewport.w >= 0) {
rect->w = (float)view->viewport.w / scale_x;
rect->w = (float)view->viewport.w;
} else {
rect->w = view->pixel_w / scale_x;
}
if (view->viewport.h >= 0) {
rect->h = (float)view->viewport.h / scale_y;
rect->h = (float)view->viewport.h;
} else {
rect->h = view->pixel_h / scale_y;
}