Render GPU: Don't call GetWindowSizeInPixels during RenderPreset (#10984)

This commit is contained in:
Evan Hemsley 2024-09-28 18:01:16 -07:00 committed by GitHub
parent a923771978
commit 66f6b40c92
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 7 deletions

View file

@ -2564,6 +2564,10 @@ static void UpdateLogicalPresentation(SDL_Renderer *renderer)
int iwidth, iheight;
SDL_GetRenderOutputSize(renderer, &iwidth, &iheight);
renderer->window_pixel_w = iwidth;
renderer->window_pixel_h = iheight;
const float output_w = (float)iwidth;
const float output_h = (float)iheight;
const float logical_w = renderer->logical_w;