From 8f0c678ae32cd08fcc633fffcc3591f3ed327830 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Wed, 13 Aug 2003 10:40:51 +0000 Subject: [PATCH] If a RageException is thrown and not caught until main(), attempt to goto windowed mode before displaying the dialog box. If that fails (any exception thrown) just quit. Don't simply freeze with a dialog box behind full screen. --- stepmania/src/StepMania.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index b9894ca37c..10b1208223 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -563,6 +563,20 @@ int main(int argc, char* argv[]) catch( RageException e ) { g_sErrorString = e.what(); + if (!PREFSMAN->m_bWindowed) + { + try + { + /* Goto windowed if possible */ + PREFSMAN->m_bWindowed = 1; + ApplyGraphicOptions(); + } + catch (...) + { + /* Couldn't goto windowed so don't display an error message */ + g_sErrorString = ""; + } + } } #endif