From 304fc990a1d9ddb93e8f60e4ee365b582439c700 Mon Sep 17 00:00:00 2001 From: Akash Date: Tue, 15 Sep 2015 17:21:35 +0530 Subject: [PATCH] PCSX2: Add Percentage Counter for FPS. The FPS has been Indicated in Paranthesis whereas Speed would provide the Integer percentage value based on the FPS limit for NTSC, PAL games. (59.94, 50) Thanks to avih for the suggestions. --- pcsx2/gui/FrameForGS.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pcsx2/gui/FrameForGS.cpp b/pcsx2/gui/FrameForGS.cpp index c05f998442..8b34fcd1b4 100644 --- a/pcsx2/gui/FrameForGS.cpp +++ b/pcsx2/gui/FrameForGS.cpp @@ -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()