mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-26 22:43:01 +00:00
GUI: don't draw at all when minimized
This commit is contained in:
parent
51883f698a
commit
c58ff8e37c
2 changed files with 5 additions and 3 deletions
|
@ -710,9 +710,6 @@ void ImGui_ImplSDL2_NewFrame()
|
|||
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)
|
||||
static Uint64 frequency = SDL_GetPerformanceFrequency();
|
||||
Uint64 current_time = SDL_GetPerformanceCounter();
|
||||
|
|
|
@ -3413,6 +3413,11 @@ bool FurnaceGUI::loop() {
|
|||
|
||||
eventTimeEnd=SDL_GetPerformanceCounter();
|
||||
|
||||
if (SDL_GetWindowFlags(sdlWin)&SDL_WINDOW_MINIMIZED) {
|
||||
SDL_Delay(100);
|
||||
continue;
|
||||
}
|
||||
|
||||
layoutTimeBegin=SDL_GetPerformanceCounter();
|
||||
|
||||
ImGui_ImplSDLRenderer_NewFrame();
|
||||
|
|
Loading…
Reference in a new issue