Merge pull request #827 from ssakash/patch-2

GS window title: Add speed in percentage and make it the main speed value
This commit is contained in:
avih 2015-09-16 15:38:25 -07:00
commit ca5e9d872f
1 changed files with 4 additions and 2 deletions

View File

@ -557,6 +557,8 @@ void GSFrame::OnUpdateTitle( wxTimerEvent& evt )
#endif
double fps = wxGetApp().FpsManager.GetFramerate();
// The "not PAL" case covers both Region_NTSC and Region_NTSC_PROGRESSIVE
float per = gsRegionMode == Region_PAL ? (fps * 100) / EmuConfig.GS.FrameratePAL.ToFloat() : (fps * 100) / EmuConfig.GS.FramerateNTSC.ToFloat();
char gsDest[128];
gsDest[0] = 0; // No need to set whole array to NULL.
@ -591,11 +593,11 @@ void GSFrame::OnUpdateTitle( wxTimerEvent& evt )
const u64& smode2 = *(u64*)PS2GS_BASE(GS_SMODE2);
SetTitle( pxsFmt( L"%s | %ls (%ls) | Limiter: %ls | fps: %6.02f%ls | State %d",
SetTitle( pxsFmt( L"%s | %ls (%ls) | Limiter: %ls | Speed: %3d%% (%6.02f)%ls | State %d",
WX_STR(fromUTF8(gsDest)),
(smode2 & 1) ? L"Interlaced" : L"Progressive",
(smode2 & 2) ? L"frame" : L"field",
limiterStr, fps, cpuUsage.c_str(), States_GetCurrentSlot() )
limiterStr, lround(per), fps, cpuUsage.c_str(), States_GetCurrentSlot() )
);
//States_GetCurrentSlot()