From 218b7d194a0a8ec575b856d85550fa71f09e5253 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 11 Feb 2006 03:47:42 +0000 Subject: [PATCH] add "Force Crash" for testing the crash handler --- stepmania/Themes/default/Languages/en.ini | 1 + stepmania/src/ScreenDebugOverlay.cpp | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/stepmania/Themes/default/Languages/en.ini b/stepmania/Themes/default/Languages/en.ini index 859d08464b..5698e83e64 100644 --- a/stepmania/Themes/default/Languages/en.ini +++ b/stepmania/Themes/default/Languages/en.ini @@ -917,6 +917,7 @@ Clear Machine Stats=Clear Machine Stats CoinMode=CoinMode Fill Machine Stats=Fill Machine Stats Flush Log=Flush Log +Force Crash=Force Crash Halt=Halt Lights Debug=Lights Debug Machine=Machine diff --git a/stepmania/src/ScreenDebugOverlay.cpp b/stepmania/src/ScreenDebugOverlay.cpp index 6cf17e373b..985951b4f3 100644 --- a/stepmania/src/ScreenDebugOverlay.cpp +++ b/stepmania/src/ScreenDebugOverlay.cpp @@ -160,7 +160,7 @@ void ScreenDebugOverlay::Init() g_Mappings.debugButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_Co); g_Mappings.debugButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_UP); g_Mappings.debugButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_DOWN); - + g_Mappings.debugButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_BACK); } @@ -405,6 +405,7 @@ static LocalizedString PULL_BACK_CAMERA ( "ScreenDebugOverlay", "Pull Back Came static LocalizedString VOLUME_UP ( "ScreenDebugOverlay", "Volume Up" ); static LocalizedString VOLUME_DOWN ( "ScreenDebugOverlay", "Volume Down" ); static LocalizedString UPTIME ( "ScreenDebugOverlay", "Uptime" ); +static LocalizedString FORCE_CRASH ( "ScreenDebugOverlay", "Force Crash" ); static LocalizedString SLOW ( "ScreenDebugOverlay", "Slow" ); static LocalizedString ON ( "ScreenDebugOverlay", "on" ); static LocalizedString OFF ( "ScreenDebugOverlay", "off" ); @@ -843,6 +844,14 @@ class DebugLineVolumeDown : public IDebugLine } }; +class DebugLineForceCrash : public IDebugLine +{ + virtual RString GetDescription() { return FORCE_CRASH.GetValue(); } + virtual RString GetValue() { return RString(); } + virtual bool IsEnabled() { return false; } + virtual void Do( RString &sMessageOut ) { FAIL_M("DebugLineCrash"); } +}; + class DebugLineUptime : public IDebugLine { virtual RString GetDescription() { return UPTIME.GetValue(); } @@ -880,6 +889,7 @@ DECLARE_ONE( DebugLineFlushLog ); DECLARE_ONE( DebugLinePullBackCamera ); DECLARE_ONE( DebugLineVolumeUp ); DECLARE_ONE( DebugLineVolumeDown ); +DECLARE_ONE( DebugLineForceCrash ); DECLARE_ONE( DebugLineUptime );