Skip to content

Commit

Permalink
Fix 3ds build
Browse files Browse the repository at this point in the history
  • Loading branch information
howard0su committed Dec 11, 2023
1 parent 9adbe81 commit 6f4bd88
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 32 deletions.
6 changes: 1 addition & 5 deletions Source/Interface/GlobalPreferences.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions Source/Interface/Preferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 )
Expand Down
2 changes: 1 addition & 1 deletion Source/SysCTR/Input/InputManagerCTR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
15 changes: 2 additions & 13 deletions Source/SysPSP/HLEGraphics/GraphicsPluginPSP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
{
Expand Down
16 changes: 6 additions & 10 deletions Source/UI/GlobalSettingsComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
};

Expand Down

0 comments on commit 6f4bd88

Please sign in to comment.