mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-11-26 02:54:17 +01:00
Prevent changing of console language while a game is running (#1114)
This commit is contained in:
parent
f69fddc6e5
commit
a2d74972d4
@ -1019,8 +1019,11 @@ void MainWindow::OnConsoleLanguage(wxCommandEvent& event)
|
|||||||
default:
|
default:
|
||||||
cemu_assert_debug(false);
|
cemu_assert_debug(false);
|
||||||
}
|
}
|
||||||
|
if (m_game_list)
|
||||||
|
{
|
||||||
m_game_list->DeleteCachedStrings();
|
m_game_list->DeleteCachedStrings();
|
||||||
m_game_list->ReloadGameEntries(false);
|
m_game_list->ReloadGameEntries(false);
|
||||||
|
}
|
||||||
g_config.Save();
|
g_config.Save();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2159,6 +2162,14 @@ void MainWindow::RecreateMenu()
|
|||||||
optionsConsoleLanguageMenu->AppendRadioItem(MAINFRAME_MENU_ID_OPTIONS_LANGUAGE_PORTUGUESE, _("&Portuguese"), wxEmptyString)->Check(config.console_language == CafeConsoleLanguage::PT);
|
optionsConsoleLanguageMenu->AppendRadioItem(MAINFRAME_MENU_ID_OPTIONS_LANGUAGE_PORTUGUESE, _("&Portuguese"), wxEmptyString)->Check(config.console_language == CafeConsoleLanguage::PT);
|
||||||
optionsConsoleLanguageMenu->AppendRadioItem(MAINFRAME_MENU_ID_OPTIONS_LANGUAGE_RUSSIAN, _("&Russian"), wxEmptyString)->Check(config.console_language == CafeConsoleLanguage::RU);
|
optionsConsoleLanguageMenu->AppendRadioItem(MAINFRAME_MENU_ID_OPTIONS_LANGUAGE_RUSSIAN, _("&Russian"), wxEmptyString)->Check(config.console_language == CafeConsoleLanguage::RU);
|
||||||
optionsConsoleLanguageMenu->AppendRadioItem(MAINFRAME_MENU_ID_OPTIONS_LANGUAGE_TAIWANESE, _("&Taiwanese"), wxEmptyString)->Check(config.console_language == CafeConsoleLanguage::TW);
|
optionsConsoleLanguageMenu->AppendRadioItem(MAINFRAME_MENU_ID_OPTIONS_LANGUAGE_TAIWANESE, _("&Taiwanese"), wxEmptyString)->Check(config.console_language == CafeConsoleLanguage::TW);
|
||||||
|
if(IsGameLaunched())
|
||||||
|
{
|
||||||
|
auto items = optionsConsoleLanguageMenu->GetMenuItems();
|
||||||
|
for (auto& item : items)
|
||||||
|
{
|
||||||
|
item->Enable(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// options submenu
|
// options submenu
|
||||||
wxMenu* optionsMenu = new wxMenu();
|
wxMenu* optionsMenu = new wxMenu();
|
||||||
|
Loading…
Reference in New Issue
Block a user