From d663b44ba00faed432a270688249a0659d55dde2 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Thu, 2 Jun 2005 22:25:42 +0000 Subject: [PATCH] add WritePreferences --- stepmania/src/ScreenDebugOverlay.cpp | 22 ++++++++++++++-------- stepmania/src/ScreenDebugOverlay.h | 1 + 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/stepmania/src/ScreenDebugOverlay.cpp b/stepmania/src/ScreenDebugOverlay.cpp index aa5a9eb300..f3ad5100e2 100644 --- a/stepmania/src/ScreenDebugOverlay.cpp +++ b/stepmania/src/ScreenDebugOverlay.cpp @@ -88,11 +88,12 @@ void ScreenDebugOverlay::Init() g_Mappings.debugButton[10] = DeviceInput(DEVICE_KEYBOARD, KEY_C8); g_Mappings.debugButton[11] = DeviceInput(DEVICE_KEYBOARD, KEY_C9); g_Mappings.debugButton[12] = DeviceInput(DEVICE_KEYBOARD, KEY_C0); - g_Mappings.debugButton[13] = DeviceInput(DEVICE_KEYBOARD, KEY_HYPHEN); - g_Mappings.debugButton[14] = DeviceInput(DEVICE_KEYBOARD, KEY_EQUAL); - g_Mappings.debugButton[15] = DeviceInput(DEVICE_KEYBOARD, KEY_LBRACKET); - g_Mappings.debugButton[16] = DeviceInput(DEVICE_KEYBOARD, KEY_RBRACKET); - g_Mappings.debugButton[17] = DeviceInput(DEVICE_KEYBOARD, KEY_BACKSLASH); + g_Mappings.debugButton[13] = DeviceInput(DEVICE_KEYBOARD, KEY_Cq); + g_Mappings.debugButton[14] = DeviceInput(DEVICE_KEYBOARD, KEY_Cw); + g_Mappings.debugButton[15] = DeviceInput(DEVICE_KEYBOARD, KEY_Ce); + g_Mappings.debugButton[16] = DeviceInput(DEVICE_KEYBOARD, KEY_Cr); + g_Mappings.debugButton[17] = DeviceInput(DEVICE_KEYBOARD, KEY_Ct); + g_Mappings.debugButton[18] = DeviceInput(DEVICE_KEYBOARD, KEY_Cy); } @@ -197,6 +198,7 @@ void ScreenDebugOverlay::UpdateText() case DebugLine_ReloadCurrentScreen: s1="Reload"; break; case DebugLine_ReloadTheme: s1="Reload Theme"; break; case DebugLine_WriteProfiles: s1="Write Profiles"; break; + case DebugLine_WritePreferences: s1="Write Preferences"; break; case DebugLine_Uptime: s1="Uptime"; break; default: ASSERT(0); } @@ -222,6 +224,7 @@ void ScreenDebugOverlay::UpdateText() case DebugLine_ReloadCurrentScreen: bOn=true; break; case DebugLine_ReloadTheme: bOn=true; break; case DebugLine_WriteProfiles: bOn=true; break; + case DebugLine_WritePreferences: bOn=true; break; case DebugLine_Uptime: bOn=false; break; default: ASSERT(0); } @@ -263,6 +266,7 @@ void ScreenDebugOverlay::UpdateText() case DebugLine_ReloadCurrentScreen: s2=SCREENMAN ? SCREENMAN->GetTopScreen()->m_sName:""; break; case DebugLine_ReloadTheme: s2=""; break; case DebugLine_WriteProfiles: s2=""; break; + case DebugLine_WritePreferences: s2=""; break; case DebugLine_Uptime: s2=SecondsToMMSSMsMsMs(RageTimer::GetTimeSinceStart()); break; default: ASSERT(0); } @@ -413,13 +417,12 @@ bool ScreenDebugOverlay::OverlayInput( const DeviceInput& DeviceI, const InputEv TEXTUREMAN->ReloadAll(); NOTESKIN->RefreshNoteSkinData( GAMESTATE->m_pCurGame ); CodeDetector::RefreshCacheItems(); - SCREENMAN->SystemMessage( "Theme reloaded." ); - // Don't update text below. Return immediately because this screen. + // HACK: Don't update text below. Return immediately because this screen. // was just destroyed as part of the them reload. return true; case DebugLine_WriteProfiles: - // HACK: Also save bookkeeping and profile info for debugging + // Also save bookkeeping and profile info for debugging // so we don't have to play through a whole song to get new output. BOOKKEEPER->WriteToDisk(); PROFILEMAN->SaveMachineProfile(); @@ -427,6 +430,9 @@ bool ScreenDebugOverlay::OverlayInput( const DeviceInput& DeviceI, const InputEv if( PROFILEMAN->IsPersistentProfile(p) ) PROFILEMAN->SaveProfile( p ); break; + case DebugLine_WritePreferences: + PREFSMAN->SaveGlobalPrefsToDisk(); + break; case DebugLine_Uptime: break; default: ASSERT(0); diff --git a/stepmania/src/ScreenDebugOverlay.h b/stepmania/src/ScreenDebugOverlay.h index f85d04f34c..d6ad6528c3 100644 --- a/stepmania/src/ScreenDebugOverlay.h +++ b/stepmania/src/ScreenDebugOverlay.h @@ -27,6 +27,7 @@ enum DebugLine DebugLine_ReloadCurrentScreen, DebugLine_ReloadTheme, DebugLine_WriteProfiles, + DebugLine_WritePreferences, DebugLine_Uptime, NUM_DEBUG_LINES };