From 2555b804d61e9e80aaadbeae6a5737c1fff4742a Mon Sep 17 00:00:00 2001 From: Jonathan Young Date: Sun, 29 Sep 2013 21:03:32 +1000 Subject: [PATCH] Fixed ERR_DROP resulting in a glitched screen with only the console accessible - show the main menu instead. --- neo/framework/Console.cpp | 17 +++++++++++++++++ neo/framework/Console.h | 3 +++ neo/framework/common_frame.cpp | 19 ++++++++++++++++++- 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/neo/framework/Console.cpp b/neo/framework/Console.cpp index f10d5a2d..b329170e 100644 --- a/neo/framework/Console.cpp +++ b/neo/framework/Console.cpp @@ -57,6 +57,7 @@ public: virtual bool ProcessEvent( const sysEvent_t* event, bool forceAccept ); virtual bool Active(); virtual void ClearNotifyLines(); + virtual void Open(); virtual void Close(); virtual void Print( const char* text ); virtual void Draw( bool forceFullScreen ); @@ -424,6 +425,22 @@ void idConsoleLocal::ClearNotifyLines() } } +/* +================ +idConsoleLocal::Open +================ +*/ +void idConsoleLocal::Open() +{ + if( keyCatching ) + return; // already open + + consoleField.ClearAutoComplete(); + consoleField.Clear(); + keyCatching = true; + SetDisplayFraction( 0.5f ); +} + /* ================ idConsoleLocal::Close diff --git a/neo/framework/Console.h b/neo/framework/Console.h index 7125c2c1..5734afba 100644 --- a/neo/framework/Console.h +++ b/neo/framework/Console.h @@ -76,6 +76,9 @@ public: // clear the timers on any recent prints that are displayed in the notify lines virtual void ClearNotifyLines() = 0; + // force console open + virtual void Open() = 0; + // some console commands, like timeDemo, will force the console closed before they start virtual void Close() = 0; diff --git a/neo/framework/common_frame.cpp b/neo/framework/common_frame.cpp index 887074fb..8a28b134 100644 --- a/neo/framework/common_frame.cpp +++ b/neo/framework/common_frame.cpp @@ -853,7 +853,24 @@ void idCommonLocal::Frame() } catch( idException& ) { - return; // an ERP_DROP was thrown + // an ERP_DROP was thrown +#if defined(USE_DOOMCLASSIC) + if( currentGame == DOOM_CLASSIC || currentGame == DOOM2_CLASSIC ) + { + return; + } +#endif + + // kill loading gui + delete loadGUI; + loadGUI = NULL; + + // drop back to main menu + LeaveGame(); + + // force the console open to show error messages + console->Open(); + return; } }