diff --git a/src/Etterna/Globals/StepMania.cpp b/src/Etterna/Globals/StepMania.cpp index 41af771eba..3545574cf7 100644 --- a/src/Etterna/Globals/StepMania.cpp +++ b/src/Etterna/Globals/StepMania.cpp @@ -1480,8 +1480,23 @@ void StepMania::HandleInputEvents(float fDeltaTime) { } if (GameLoop::GetAndClearToggleWindowed()) { - PREFSMAN->m_bWindowed.Set(!PREFSMAN->m_bWindowed); - StepMania::ApplyGraphicOptions(); + int attempted = 0; + while (true) + { + if (attempted >= 2) + { + Locator::getLogger()->error("End my resizing suffering."); + ShutdownGame(); + } + + PREFSMAN->m_bWindowed.Set(!PREFSMAN->m_bWindowed); + StepMania::ApplyGraphicOptions(); + + attempted++; + Locator::getLogger()->info("Focused: {}", GameLoop::isGameFocused()? "yes" : "no"); + + if (GameLoop::isGameFocused()) break; + } } }