From 025eef63b5f12c17fb52c60ff96c94f9674b5723 Mon Sep 17 00:00:00 2001 From: Jonathan Li Date: Sun, 26 Nov 2017 22:47:16 +0000 Subject: [PATCH] pcsx2:gui: Display '&' properly in recent ISO list menu & is used to specify the keyboard shortcut key in menu labels. && must be used to display an &. Closes #2148. --- pcsx2/gui/RecentIsoList.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pcsx2/gui/RecentIsoList.cpp b/pcsx2/gui/RecentIsoList.cpp index c19bd9c2ba..a2b1377419 100644 --- a/pcsx2/gui/RecentIsoList.cpp +++ b/pcsx2/gui/RecentIsoList.cpp @@ -188,7 +188,12 @@ void RecentIsoManager::InsertIntoMenu( int id ) if (this->m_firstIdForMenuItems_or_wxID_ANY != wxID_ANY) wxid = this->m_firstIdForMenuItems_or_wxID_ANY + id; - curitem.ItemPtr = m_Menu->AppendRadioItem( wxid, Path::GetFilename(curitem.Filename), curitem.Filename ); + wxString filename = Path::GetFilename(curitem.Filename); + // & is used to specify the keyboard shortcut key in menu labels. && must + // be used to display an &. + filename.Replace("&", "&&", true); + + curitem.ItemPtr = m_Menu->AppendRadioItem( wxid, filename, curitem.Filename ); curitem.ItemPtr->Enable(wxFileExists(curitem.Filename) && !g_Conf->AskOnBoot); }