diff --git a/Source/Project64/User Interface/Gui Class.cpp b/Source/Project64/User Interface/Gui Class.cpp index 81ad227f3..17e87d875 100644 --- a/Source/Project64/User Interface/Gui Class.cpp +++ b/Source/Project64/User Interface/Gui Class.cpp @@ -138,6 +138,16 @@ void CMainGui::AddRecentRom(const char * ImagePath) } } +void CMainGui::SetWindowCaption(const wchar_t * title) +{ + static const size_t TITLE_SIZE = 256; + wchar_t WinTitle[TITLE_SIZE]; + + _snwprintf(WinTitle, TITLE_SIZE, L"%s - %s", title, g_Settings->LoadStringVal(Setting_ApplicationName).ToUTF16().c_str()); + WinTitle[TITLE_SIZE - 1] = 0; + Caption(WinTitle); +} + void RomBowserEnabledChanged(CMainGui * Gui) { if (Gui && g_Settings->LoadBool(RomBrowser_Enabled)) @@ -168,7 +178,7 @@ void CMainGui::GameLoaded(CMainGui * Gui) { WriteTrace(TraceDebug, __FUNCTION__ ": Add Recent Rom"); Gui->AddRecentRom(FileLoc.c_str()); - Notify().SetWindowCaption(g_Settings->LoadStringVal(Game_GoodName).ToUTF16().c_str()); + Gui->SetWindowCaption(g_Settings->LoadStringVal(Game_GoodName).ToUTF16().c_str()); Gui->HideRomList(); } diff --git a/Source/Project64/User Interface/Gui Class.h b/Source/Project64/User Interface/Gui Class.h index fc8ed9a23..a98293a0e 100644 --- a/Source/Project64/User Interface/Gui Class.h +++ b/Source/Project64/User Interface/Gui Class.h @@ -104,6 +104,7 @@ private: void CreateStatusBar(void); void Resize(DWORD fwSizeType, WORD nWidth, WORD nHeight); //responding to WM_SIZE void AddRecentRom(const char * ImagePath); + void SetWindowCaption(const wchar_t * Caption); friend DWORD CALLBACK AboutBoxProc(HWND, DWORD, DWORD, DWORD); friend DWORD CALLBACK AboutIniBoxProc(HWND, DWORD, DWORD, DWORD); diff --git a/Source/Project64/User Interface/Notification Class.cpp b/Source/Project64/User Interface/Notification Class.cpp index 858b36556..097adf98f 100644 --- a/Source/Project64/User Interface/Notification Class.cpp +++ b/Source/Project64/User Interface/Notification Class.cpp @@ -125,20 +125,6 @@ void CNotification::SetGfxPlugin(CGfxPlugin * Plugin) m_gfxPlugin = Plugin; } -void CNotification::SetWindowCaption(const wchar_t * Caption) -{ - static const size_t TITLE_SIZE = 256; - wchar_t WinTitle[TITLE_SIZE]; - - _snwprintf(WinTitle, TITLE_SIZE, L"%s - %s", Caption, g_Settings->LoadStringVal(Setting_ApplicationName).ToUTF16().c_str()); - WinTitle[TITLE_SIZE - 1] = 0; -#if defined(WINDOWS_UI) - m_hWnd->Caption(WinTitle); -#else - g_Notify->BreakPoint(__FILEW__, __LINE__); -#endif -} - void CNotification::FatalError(LanguageStringID StringID) const { FatalError(g_Lang->GetString(StringID).c_str());