From 36a1c7a265ac8a652293808c7f2cc0b79612bae5 Mon Sep 17 00:00:00 2001 From: Akash Date: Fri, 8 Dec 2017 12:16:44 +0530 Subject: [PATCH] PCSX2-WX: Display the video mode on titlebar I found it might be useful for looking into issues at certain cases where users provide a screenshot covering the titlebar, so we can easily identify which video mode is being used. Especially useful for looking into PCRTC issues. --- pcsx2/Counters.cpp | 2 +- pcsx2/Counters.h | 2 +- pcsx2/gui/AppConfig.cpp | 2 +- pcsx2/gui/FrameForGS.cpp | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pcsx2/Counters.cpp b/pcsx2/Counters.cpp index 7cdc70cfac..2db62f0799 100644 --- a/pcsx2/Counters.cpp +++ b/pcsx2/Counters.cpp @@ -249,7 +249,7 @@ static void vSyncInfoCalc(vSyncTimingInfo* info, Fixed100 framesPerSecond, u32 s // is thus not worth the effort at this time. } -static const char* ReportVideoMode() +const char* ReportVideoMode() { switch (gsVideoMode) { diff --git a/pcsx2/Counters.h b/pcsx2/Counters.h index bc19e92d4d..55be274abb 100644 --- a/pcsx2/Counters.h +++ b/pcsx2/Counters.h @@ -122,7 +122,7 @@ struct SyncCounter #define MODE_HRENDER 0x0 //Set for ~5/6 of 1 Scanline #define MODE_HBLANK 0x1 //Set for the remaining ~1/6 of 1 Scanline - +extern const char* ReportVideoMode(); extern Counter counters[4]; extern SyncCounter hsyncCounter; extern SyncCounter vsyncCounter; diff --git a/pcsx2/gui/AppConfig.cpp b/pcsx2/gui/AppConfig.cpp index 7e75d2e9a4..d13dbf90d9 100644 --- a/pcsx2/gui/AppConfig.cpp +++ b/pcsx2/gui/AppConfig.cpp @@ -950,7 +950,7 @@ AppConfig::UiTemplateOptions::UiTemplateOptions() OutputProgressive = L"Progressive"; OutputInterlaced = L"Interlaced"; Paused = L" "; - TitleTemplate = L"Slot: ${slot} | Speed: ${speed} (${vfps}) | Limiter: ${limiter} | ${gsdx} | ${omodei} | ${cpuusage}"; + TitleTemplate = L"Slot: ${slot} | Speed: ${speed} (${vfps}) | ${videomode} | Limiter: ${limiter} | ${gsdx} | ${omodei} | ${cpuusage}"; } void AppConfig::UiTemplateOptions::LoadSave(IniInterface& ini) diff --git a/pcsx2/gui/FrameForGS.cpp b/pcsx2/gui/FrameForGS.cpp index 7a19ad57b3..5b650563d0 100644 --- a/pcsx2/gui/FrameForGS.cpp +++ b/pcsx2/gui/FrameForGS.cpp @@ -662,6 +662,7 @@ void GSFrame::OnUpdateTitle( wxTimerEvent& evt ) title.Replace(L"${omodef}", omodef); title.Replace(L"${omodei}", omodei); title.Replace(L"${gsdx}", fromUTF8(gsDest)); + title.Replace(L"${videomode}", ReportVideoMode()); if (CoreThread.IsPaused()) title = templates.Paused + title;