diff --git a/Source/Core/Core/ConfigManager.cpp b/Source/Core/Core/ConfigManager.cpp index e96fd3977b..3a35b4ff20 100644 --- a/Source/Core/Core/ConfigManager.cpp +++ b/Source/Core/Core/ConfigManager.cpp @@ -328,6 +328,7 @@ void SConfig::SaveMovieSettings(IniFile& ini) movie->Set("PauseMovie", m_PauseMovie); movie->Set("Author", m_strMovieAuthor); movie->Set("DumpFrames", m_DumpFrames); + movie->Set("ShowInputDisplay", m_ShowInputDisplay); } void SConfig::SaveDSPSettings(IniFile& ini) @@ -555,6 +556,7 @@ void SConfig::LoadMovieSettings(IniFile& ini) movie->Get("PauseMovie", &m_PauseMovie, false); movie->Get("Author", &m_strMovieAuthor, ""); movie->Get("DumpFrames", &m_DumpFrames, false); + movie->Get("ShowInputDisplay", &m_ShowInputDisplay, false); } void SConfig::LoadDSPSettings(IniFile& ini) diff --git a/Source/Core/Core/ConfigManager.h b/Source/Core/Core/ConfigManager.h index 8fc8cf8f44..9f44b884c6 100644 --- a/Source/Core/Core/ConfigManager.h +++ b/Source/Core/Core/ConfigManager.h @@ -90,6 +90,7 @@ struct SConfig : NonCopyable std::string m_strMovieAuthor; unsigned int m_FrameSkip; bool m_DumpFrames; + bool m_ShowInputDisplay; // DSP settings bool m_DSPEnableJIT; diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index 4fa5458b9d..eb4ba24c3c 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -235,6 +235,7 @@ EVT_MENU(IDM_TASINPUT, CFrame::OnTASInput) EVT_MENU(IDM_TOGGLE_PAUSEMOVIE, CFrame::OnTogglePauseMovie) EVT_MENU(IDM_SHOWLAG, CFrame::OnShowLag) EVT_MENU(IDM_SHOWFRAMECOUNT, CFrame::OnShowFrameCount) +EVT_MENU(IDM_SHOWINPUTDISPLAY, CFrame::OnShowInputDisplay) EVT_MENU(IDM_FRAMESTEP, CFrame::OnFrameStep) EVT_MENU(IDM_SCREENSHOT, CFrame::OnScreenshot) EVT_MENU(IDM_TOGGLE_DUMPFRAMES, CFrame::OnToggleDumpFrames) diff --git a/Source/Core/DolphinWX/Frame.h b/Source/Core/DolphinWX/Frame.h index 9930ea6354..335adc6b39 100644 --- a/Source/Core/DolphinWX/Frame.h +++ b/Source/Core/DolphinWX/Frame.h @@ -274,6 +274,7 @@ private: void OnToggleDumpAudio(wxCommandEvent& event); void OnShowLag(wxCommandEvent& event); void OnShowFrameCount(wxCommandEvent& event); + void OnShowInputDisplay(wxCommandEvent& event); void OnChangeDisc(wxCommandEvent& event); void OnScreenshot(wxCommandEvent& event); void OnActive(wxActivateEvent& event); diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp index df0ea784d0..08c1c3fd7c 100644 --- a/Source/Core/DolphinWX/FrameTools.cpp +++ b/Source/Core/DolphinWX/FrameTools.cpp @@ -218,6 +218,8 @@ wxMenuBar* CFrame::CreateMenu() movieMenu->AppendCheckItem(IDM_SHOWFRAMECOUNT, _("Show frame counter")); movieMenu->Check(IDM_SHOWFRAMECOUNT, SConfig::GetInstance().m_ShowFrameCount); movieMenu->Check(IDM_RECORDREADONLY, true); + movieMenu->AppendCheckItem(IDM_SHOWINPUTDISPLAY, _("Show input display")); + movieMenu->Check(IDM_SHOWINPUTDISPLAY, SConfig::GetInstance().m_ShowInputDisplay); movieMenu->AppendSeparator(); movieMenu->AppendCheckItem(IDM_TOGGLE_DUMPFRAMES, _("Dump frames")); movieMenu->Check(IDM_TOGGLE_DUMPFRAMES, SConfig::GetInstance().m_DumpFrames); @@ -753,6 +755,12 @@ void CFrame::OnShowFrameCount(wxCommandEvent& WXUNUSED (event)) SConfig::GetInstance().SaveSettings(); } +void CFrame::OnShowInputDisplay(wxCommandEvent& WXUNUSED(event)) +{ + SConfig::GetInstance().m_ShowInputDisplay = !SConfig::GetInstance().m_ShowInputDisplay; + SConfig::GetInstance().SaveSettings(); +} + void CFrame::OnFrameStep(wxCommandEvent& event) { bool wasPaused = (Core::GetState() == Core::CORE_PAUSE); diff --git a/Source/Core/DolphinWX/Globals.h b/Source/Core/DolphinWX/Globals.h index 8d2c166bd5..51428100ff 100644 --- a/Source/Core/DolphinWX/Globals.h +++ b/Source/Core/DolphinWX/Globals.h @@ -92,6 +92,7 @@ enum IDM_TOGGLE_PAUSEMOVIE, IDM_SHOWLAG, IDM_SHOWFRAMECOUNT, + IDM_SHOWINPUTDISPLAY, IDM_FRAMESTEP, IDM_SCREENSHOT, IDM_TOGGLE_DUMPFRAMES, diff --git a/Source/Core/DolphinWX/VideoConfigDiag.cpp b/Source/Core/DolphinWX/VideoConfigDiag.cpp index 5274b1e3ea..503e32722d 100644 --- a/Source/Core/DolphinWX/VideoConfigDiag.cpp +++ b/Source/Core/DolphinWX/VideoConfigDiag.cpp @@ -132,7 +132,6 @@ static wxString disable_fog_desc = wxTRANSLATE("Makes distant objects more visib static wxString disable_dstalpha_desc = wxTRANSLATE("Disables emulation of a hardware feature called destination alpha, which is used in many games for various graphical effects.\n\nIf unsure, leave this unchecked."); static wxString show_fps_desc = wxTRANSLATE("Show the number of frames rendered per second as a measure of emulation speed.\n\nIf unsure, leave this unchecked."); static wxString log_render_time_to_file_desc = wxTRANSLATE("Log the render time of every frame to User/Logs/render_time.txt. Use this feature when you want to measure the performance of Dolphin.\n\nIf unsure, leave this unchecked."); -static wxString show_input_display_desc = wxTRANSLATE("Display the inputs read by the emulator.\n\nIf unsure, leave this unchecked."); static wxString show_stats_desc = wxTRANSLATE("Show various statistics.\n\nIf unsure, leave this unchecked."); static wxString texfmt_desc = wxTRANSLATE("Modify textures to show the format they're encoded in. Needs an emulation reset in most cases.\n\nIf unsure, leave this unchecked."); static wxString efb_copy_regions_desc = wxTRANSLATE("[BROKEN]\nHighlight regions the EFB was copied from.\n\nIf unsure, leave this unchecked."); @@ -570,7 +569,6 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con { wxGridSizer* const szr_misc = new wxGridSizer(2, 5, 5); - szr_misc->Add(CreateCheckBox(page_advanced, _("Show Input Display"), wxGetTranslation(show_input_display_desc), vconfig.bShowInputDisplay)); szr_misc->Add(CreateCheckBox(page_advanced, _("Crop"), wxGetTranslation(crop_desc), vconfig.bCrop)); // Progressive Scan diff --git a/Source/Core/VideoBackends/D3D/Render.cpp b/Source/Core/VideoBackends/D3D/Render.cpp index e8464d6816..8803cbb4f2 100644 --- a/Source/Core/VideoBackends/D3D/Render.cpp +++ b/Source/Core/VideoBackends/D3D/Render.cpp @@ -861,7 +861,7 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co D3D::font.DrawTextScaled(0, 18, 20, 0.0f, 0xFF00FFFF, lag); } - if (g_ActiveConfig.bShowInputDisplay) + if (SConfig::GetInstance().m_ShowInputDisplay) { D3D::font.DrawTextScaled(0, 36, 20, 0.0f, 0xFF00FFFF, Movie::GetInputDisplay()); } diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp index 0239c67582..6bd9004808 100644 --- a/Source/Core/VideoBackends/OGL/Render.cpp +++ b/Source/Core/VideoBackends/OGL/Render.cpp @@ -730,7 +730,7 @@ void Renderer::DrawDebugInfo() if (SConfig::GetInstance().m_ShowLag) debug_info += StringFromFormat("Lag: %" PRIu64 "\n", Movie::g_currentLagCount); - if (g_ActiveConfig.bShowInputDisplay) + if (SConfig::GetInstance().m_ShowInputDisplay) debug_info += Movie::GetInputDisplay(); if (GLInterface->GetMode() == GLInterfaceMode::MODE_OPENGL && g_ActiveConfig.bShowEFBCopyRegions) diff --git a/Source/Core/VideoCommon/VideoConfig.cpp b/Source/Core/VideoCommon/VideoConfig.cpp index b4d53346d1..427c2ad9e1 100644 --- a/Source/Core/VideoCommon/VideoConfig.cpp +++ b/Source/Core/VideoCommon/VideoConfig.cpp @@ -58,7 +58,6 @@ void VideoConfig::Load(const std::string& ini_file) settings->Get("SafeTextureCacheColorSamples", &iSafeTextureCache_ColorSamples,128); settings->Get("ShowFPS", &bShowFPS, false); settings->Get("LogRenderTimeToFile", &bLogRenderTimeToFile, false); - settings->Get("ShowInputDisplay", &bShowInputDisplay, false); settings->Get("OverlayStats", &bOverlayStats, false); settings->Get("OverlayProjStats", &bOverlayProjStats, false); settings->Get("ShowEFBCopyRegions", &bShowEFBCopyRegions, false); @@ -226,7 +225,6 @@ void VideoConfig::Save(const std::string& ini_file) settings->Set("SafeTextureCacheColorSamples", iSafeTextureCache_ColorSamples); settings->Set("ShowFPS", bShowFPS); settings->Set("LogRenderTimeToFile", bLogRenderTimeToFile); - settings->Set("ShowInputDisplay", bShowInputDisplay); settings->Set("OverlayStats", bOverlayStats); settings->Set("OverlayProjStats", bOverlayProjStats); settings->Set("DumpTextures", bDumpTextures); diff --git a/Source/Core/VideoCommon/VideoConfig.h b/Source/Core/VideoCommon/VideoConfig.h index 8154f5a840..04a7ac7205 100644 --- a/Source/Core/VideoCommon/VideoConfig.h +++ b/Source/Core/VideoCommon/VideoConfig.h @@ -77,7 +77,6 @@ struct VideoConfig final // Information bool bShowFPS; - bool bShowInputDisplay; bool bOverlayStats; bool bOverlayProjStats; bool bTexFmtOverlayEnable;