GUI: don't draw at all when minimized
This commit is contained in:
parent
51883f698a
commit
c58ff8e37c
|
@ -710,9 +710,6 @@ void ImGui_ImplSDL2_NewFrame()
|
||||||
platform_io.Monitors[0].DpiScale=(float)display_w/(float)w;
|
platform_io.Monitors[0].DpiScale=(float)display_w/(float)w;
|
||||||
}
|
}
|
||||||
|
|
||||||
logV("io.DisplaySize: %f, %f",io.DisplaySize.x,io.DisplaySize.y);
|
|
||||||
logV("io.DisplayFramebufferScale: %f, %f",io.DisplayFramebufferScale.x,io.DisplayFramebufferScale.y);
|
|
||||||
|
|
||||||
// Setup time step (we don't use SDL_GetTicks() because it is using millisecond resolution)
|
// Setup time step (we don't use SDL_GetTicks() because it is using millisecond resolution)
|
||||||
static Uint64 frequency = SDL_GetPerformanceFrequency();
|
static Uint64 frequency = SDL_GetPerformanceFrequency();
|
||||||
Uint64 current_time = SDL_GetPerformanceCounter();
|
Uint64 current_time = SDL_GetPerformanceCounter();
|
||||||
|
|
|
@ -3413,6 +3413,11 @@ bool FurnaceGUI::loop() {
|
||||||
|
|
||||||
eventTimeEnd=SDL_GetPerformanceCounter();
|
eventTimeEnd=SDL_GetPerformanceCounter();
|
||||||
|
|
||||||
|
if (SDL_GetWindowFlags(sdlWin)&SDL_WINDOW_MINIMIZED) {
|
||||||
|
SDL_Delay(100);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
layoutTimeBegin=SDL_GetPerformanceCounter();
|
layoutTimeBegin=SDL_GetPerformanceCounter();
|
||||||
|
|
||||||
ImGui_ImplSDLRenderer_NewFrame();
|
ImGui_ImplSDLRenderer_NewFrame();
|
||||||
|
|
Loading…
Reference in a new issue