mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-08 15:35:50 +01:00
Backends: SDL2: Fix incorrect screen clipping when SDL_RenderSetLogicalSize is used
This commit is contained in:
parent
0653a0d42a
commit
bc51d937f3
@ -870,7 +870,13 @@ static void ImGui_ImplSDL2_GetWindowSizeAndFramebufferScale(SDL_Window* window,
|
||||
{
|
||||
int w, h;
|
||||
int display_w, display_h;
|
||||
SDL_GetWindowSize(window, &w, &h);
|
||||
|
||||
SDL_RenderGetLogicalSize(renderer, &w, &h);
|
||||
if (w == 0 || h == 0)
|
||||
{ // GetLogicalSize returns 0, 0 when it is unset
|
||||
SDL_GetWindowSize(window, &w, &h);
|
||||
}
|
||||
|
||||
if (SDL_GetWindowFlags(window) & SDL_WINDOW_MINIMIZED)
|
||||
w = h = 0;
|
||||
if (renderer != nullptr)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user