mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 00:59:44 -06:00
Change wxString(<string>, wxConvUTF8) method of creating unicode from filenames to wxSafeConvertMB2WX()
(Just applied to FrameTools.cpp for now) Allows one to properly restart Pokémon by hitting play :P Ignore non-ASCII strings passed to DisplayMessage(). These strings would end up going to renderer display and statusbar/titlebar, which can't handle them properly.
This commit is contained in:
@ -632,12 +632,12 @@ void CFrame::BootGame(const std::string& filename)
|
||||
bootfile = m_GameListCtrl->GetSelectedISO()->GetFileName();
|
||||
}
|
||||
else if (!StartUp.m_strDefaultGCM.empty()
|
||||
&& wxFileExists(wxString(StartUp.m_strDefaultGCM.c_str(), wxConvUTF8)))
|
||||
&& wxFileExists(wxSafeConvertMB2WX(StartUp.m_strDefaultGCM.c_str())))
|
||||
bootfile = StartUp.m_strDefaultGCM;
|
||||
else
|
||||
{
|
||||
if (!SConfig::GetInstance().m_LastFilename.empty()
|
||||
&& wxFileExists(wxString(SConfig::GetInstance().m_LastFilename.c_str(), wxConvUTF8)))
|
||||
&& wxFileExists(wxSafeConvertMB2WX(SConfig::GetInstance().m_LastFilename.c_str())))
|
||||
bootfile = SConfig::GetInstance().m_LastFilename;
|
||||
else
|
||||
{
|
||||
@ -1646,7 +1646,7 @@ void CFrame::UpdateGUI()
|
||||
}
|
||||
// Prepare to load last selected file, enable play button
|
||||
else if (!SConfig::GetInstance().m_LastFilename.empty()
|
||||
&& wxFileExists(wxString(SConfig::GetInstance().m_LastFilename.c_str(), wxConvUTF8)))
|
||||
&& wxFileExists(wxSafeConvertMB2WX(SConfig::GetInstance().m_LastFilename.c_str())))
|
||||
{
|
||||
if (m_ToolBar)
|
||||
m_ToolBar->EnableTool(IDM_PLAY, true);
|
||||
|
Reference in New Issue
Block a user