diff --git a/Source/Interface/GlobalPreferences.h b/Source/Interface/GlobalPreferences.h index d7401708a..6280e4eac 100644 --- a/Source/Interface/GlobalPreferences.h +++ b/Source/Interface/GlobalPreferences.h @@ -54,12 +54,8 @@ enum ETVType struct SGlobalPreferences { - // This will need to be changed globally as it makes a lot more sense - #if defined(DAEDALUS_CTR) bool DisplayFramerate; - #else - u32 DisplayFramerate; - #endif + #ifdef DAEDALUS_DEBUG_DISPLAYLIST bool HighlightInexactBlendModes; bool CustomBlendModes; diff --git a/Source/Interface/Preferences.cpp b/Source/Interface/Preferences.cpp index dddf14622..46161d9f5 100644 --- a/Source/Interface/Preferences.cpp +++ b/Source/Interface/Preferences.cpp @@ -147,7 +147,7 @@ bool IPreferences::OpenPreferencesFile( const std::filesystem::path &filename ) const SGlobalPreferences defaults; - INT_SETTING( gGlobalPreferences, DisplayFramerate, defaults ); + BOOL_SETTING( gGlobalPreferences, DisplayFramerate, defaults ); BOOL_SETTING( gGlobalPreferences, ForceLinearFilter, defaults ); BOOL_SETTING( gGlobalPreferences, RumblePak, defaults ); #ifdef DAEDALUS_DEBUG_DISPLAYLIST @@ -338,7 +338,7 @@ void IPreferences::Commit() #ifdef DAEDALUS_PSP #define OUTPUT_LANGUAGE( b, nm, def ) fprintf( fh, "%s=%s\n", #nm, Translate_NameFromIndex( b.nm ) ); #endif - OUTPUT_INT( gGlobalPreferences, DisplayFramerate, defaults ); + OUTPUT_BOOL( gGlobalPreferences, DisplayFramerate, defaults ); OUTPUT_BOOL( gGlobalPreferences, ForceLinearFilter, defaults ); OUTPUT_BOOL( gGlobalPreferences, RumblePak, defaults ); #ifdef DAEDALUS_DEBUG_DISPLAYLIST @@ -403,7 +403,7 @@ void IPreferences::SetRomPreferences( const RomID & id, const SRomPreferences & SGlobalPreferences::SGlobalPreferences() -: DisplayFramerate( 0 ) +: DisplayFramerate( false ) #ifdef DAEDALUS_DEBUG_DISPLAYLIST , HighlightInexactBlendModes( false ) , CustomBlendModes( true ) diff --git a/Source/SysCTR/Input/InputManagerCTR.cpp b/Source/SysCTR/Input/InputManagerCTR.cpp index ed241d3c7..d6a6847c6 100644 --- a/Source/SysCTR/Input/InputManagerCTR.cpp +++ b/Source/SysCTR/Input/InputManagerCTR.cpp @@ -316,7 +316,7 @@ bool IInputManager::Initialise() } char ControllerConfigs[128]; - IO::Path::Combine(ControllerConfigs, baseDir, "CoontrollerConfigs"); + IO::Path::Combine(ControllerConfigs, baseDir.string().c_str(), "CoontrollerConfigs"); LoadControllerConfigs(ControllerConfigs); SetConfiguration(0); diff --git a/Source/SysPSP/HLEGraphics/GraphicsPluginPSP.cpp b/Source/SysPSP/HLEGraphics/GraphicsPluginPSP.cpp index 9a0762391..d9aa41995 100644 --- a/Source/SysPSP/HLEGraphics/GraphicsPluginPSP.cpp +++ b/Source/SysPSP/HLEGraphics/GraphicsPluginPSP.cpp @@ -214,22 +214,11 @@ void CGraphicsPluginImpl::UpdateScreen() pspDebugScreenSetBackColor(0); pspDebugScreenSetXY(0, 0); - switch(gGlobalPreferences.DisplayFramerate) - { - case 1: - pspDebugScreenPrintf( "%#.1f ", gCurrentFramerate ); - break; - case 2: - pspDebugScreenPrintf( "FPS[%#.1f] VB[%d/%d] Sync[%#.1f%%] ", gCurrentFramerate, u32( Fsync * f32( FramerateLimiter_GetTvFrequencyHz() ) ), FramerateLimiter_GetTvFrequencyHz(), Fsync * 100.0f ); - break; - case 3: #ifdef DAEDALUS_DEBUG_DISPLAYLIST - pspDebugScreenPrintf( "Dlist[%d] Cull[%d] | Tris[%d] Cull[%d] | Rect[%d] Clip[%d] ", gNumInstructionsExecuted, gNumDListsCulled, gRenderer->GetNumTrisRendered(), gRenderer->GetNumTrisClipped(), gRenderer->GetNumRect(), gNumRectsClipped); + pspDebugScreenPrintf( "Dlist[%d] Cull[%d] | Tris[%d] Cull[%d] | Rect[%d] Clip[%d] ", gNumInstructionsExecuted, gNumDListsCulled, gRenderer->GetNumTrisRendered(), gRenderer->GetNumTrisClipped(), gRenderer->GetNumRect(), gNumRectsClipped); #else - pspDebugScreenPrintf( "%#.1f ", gCurrentFramerate ); + pspDebugScreenPrintf( "FPS[%#.1f] VB[%d/%d] Sync[%#.1f%%] ", gCurrentFramerate, u32( Fsync * f32( FramerateLimiter_GetTvFrequencyHz() ) ), FramerateLimiter_GetTvFrequencyHz(), Fsync * 100.0f ); #endif - break; - } } if( gGlobalPreferences.BatteryWarning ) { diff --git a/Source/UI/GlobalSettingsComponent.cpp b/Source/UI/GlobalSettingsComponent.cpp index 523e310e8..7cdeb5199 100644 --- a/Source/UI/GlobalSettingsComponent.cpp +++ b/Source/UI/GlobalSettingsComponent.cpp @@ -276,19 +276,15 @@ namespace { } - virtual void OnNext() { if (gGlobalPreferences.DisplayFramerate < 3) gGlobalPreferences.DisplayFramerate++; } - virtual void OnPrevious() { if (gGlobalPreferences.DisplayFramerate > 0) gGlobalPreferences.DisplayFramerate--; } + virtual void OnNext() { gGlobalPreferences.DisplayFramerate = !gGlobalPreferences.DisplayFramerate; } + virtual void OnPrevious() { gGlobalPreferences.DisplayFramerate = !gGlobalPreferences.DisplayFramerate; } virtual const char * GetSettingName() const { - switch ( gGlobalPreferences.DisplayFramerate ) - { - case 0: return "None"; - case 1: return "FPS"; - case 2: return "FPS + VB + SYNC"; - case 3: return "Render stats"; - } - return "?"; + if ( gGlobalPreferences.DisplayFramerate ) + return "None"; + else + return "None"; } };