diff --git a/Source/Core/Core/Core.cpp b/Source/Core/Core/Core.cpp index c16e9529fa..8a0cc0a274 100644 --- a/Source/Core/Core/Core.cpp +++ b/Source/Core/Core/Core.cpp @@ -682,7 +682,6 @@ void UpdateTitle() } // This is our final "frame counter" string std::string SMessage = StringFromFormat("%s | %s", SSettings.c_str(), SFPS.c_str()); - std::string TMessage = StringFromFormat("%s | %s", scm_rev_str, SMessage.c_str()); // Update the audio timestretcher with the current speed if (soundStream) @@ -691,16 +690,7 @@ void UpdateTitle() pMixer->UpdateSpeed((float)Speed / 100); } - if (_CoreParameter.bRenderToMain && - SConfig::GetInstance().m_InterfaceStatusbar) - { - Host_UpdateStatusBar(SMessage); - Host_UpdateTitle(scm_rev_str); - } - else - { - Host_UpdateTitle(TMessage); - } + Host_UpdateTitle(SMessage); } void Shutdown() diff --git a/Source/Core/Core/Host.h b/Source/Core/Core/Host.h index 480846baeb..7a493bc96a 100644 --- a/Source/Core/Core/Host.h +++ b/Source/Core/Core/Host.h @@ -37,7 +37,6 @@ void Host_SetWiiMoteConnectionState(int _State); void Host_SysMessage(const char *fmt, ...); void Host_UpdateDisasmDialog(); void Host_UpdateMainFrame(); -void Host_UpdateStatusBar(const std::string& text, int Filed = 0); void Host_UpdateTitle(const std::string& title); void Host_ShowVideoConfig(void* parent, const std::string& backend_name, const std::string& config_name); diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index b710ba07cb..126cb3ea74 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -628,6 +628,21 @@ WXLRESULT CFrame::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) } #endif +void CFrame::UpdateTitle(const std::string &str) +{ + if (SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain && + SConfig::GetInstance().m_InterfaceStatusbar) + { + GetStatusBar()->SetStatusText(str, 0); + m_RenderFrame->SetTitle(scm_rev_str); + } + else + { + std::string titleStr = StringFromFormat("%s | %s", scm_rev_str, str.c_str()); + m_RenderFrame->SetTitle(titleStr); + } +} + void CFrame::OnHostMessage(wxCommandEvent& event) { switch (event.GetId()) @@ -642,8 +657,7 @@ void CFrame::OnHostMessage(wxCommandEvent& event) break; case IDM_UPDATETITLE: - if (m_RenderFrame != nullptr) - m_RenderFrame->SetTitle(event.GetString()); + SetTitle(event.GetString()); break; case IDM_WINDOWSIZEREQUEST: diff --git a/Source/Core/DolphinWX/Frame.h b/Source/Core/DolphinWX/Frame.h index d54f1e54e0..1ca67caa5e 100644 --- a/Source/Core/DolphinWX/Frame.h +++ b/Source/Core/DolphinWX/Frame.h @@ -126,6 +126,7 @@ public: void UpdateWiiMenuChoice(wxMenuItem *WiiMenuItem=nullptr); void PopulateSavedPerspectives(); static void ConnectWiimote(int wm_idx, bool connect); + void UpdateTitle(const std::string &str); const CGameListCtrl *GetGameListCtrl() const; diff --git a/Source/Core/DolphinWX/Main.cpp b/Source/Core/DolphinWX/Main.cpp index 1f40da2d9a..774e1bfc0a 100644 --- a/Source/Core/DolphinWX/Main.cpp +++ b/Source/Core/DolphinWX/Main.cpp @@ -607,17 +607,6 @@ void Host_SetStartupDebuggingParameters() StartUp.bEnableDebugging = main_frame->g_pCodeWindow ? true : false; // RUNNING_DEBUG } -void Host_UpdateStatusBar(const std::string& text, int Field) -{ - wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_UPDATESTATUSBAR); - // Set the event string - event.SetString(StrToWxStr(text)); - // Update statusbar field - event.SetInt(Field); - // Post message - main_frame->GetEventHandler()->AddPendingEvent(event); -} - void Host_SetWiiMoteConnectionState(int _State) { static int currentState = -1; diff --git a/Source/Core/DolphinWX/MainAndroid.cpp b/Source/Core/DolphinWX/MainAndroid.cpp index e6f3a3bbea..67cf2619ab 100644 --- a/Source/Core/DolphinWX/MainAndroid.cpp +++ b/Source/Core/DolphinWX/MainAndroid.cpp @@ -104,8 +104,6 @@ bool Host_RendererHasFocus() void Host_ConnectWiimote(int wm_idx, bool connect) {} -void Host_UpdateStatusBar(const std::string& text, int filed){} - void Host_SysMessage(const char *fmt, ...) { va_list args; diff --git a/Source/Core/DolphinWX/MainNoGUI.cpp b/Source/Core/DolphinWX/MainNoGUI.cpp index cca5d6ffb8..da55da9fbe 100644 --- a/Source/Core/DolphinWX/MainNoGUI.cpp +++ b/Source/Core/DolphinWX/MainNoGUI.cpp @@ -102,8 +102,6 @@ bool Host_RendererHasFocus() void Host_ConnectWiimote(int wm_idx, bool connect) {} -void Host_UpdateStatusBar(const std::string& text, int filed){} - void Host_SysMessage(const char *fmt, ...) { va_list list;