From 48ae52976241e446b3ed7ad77bba7914005dd1df Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sun, 11 Feb 2024 10:58:42 +0100 Subject: [PATCH] Android: Update Load Wii System Menu string in onPrepareOptionsMenu Because the wording of the Load Wii System Menu string can change depending on the contents of the NAND, we should update that menu item in a method that's guaranteed to get called every time the user opens the menu rather than one that's only guaranteed to be called once. --- .../java/org/dolphinemu/dolphinemu/ui/main/MainActivity.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainActivity.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainActivity.kt index 84d870c921..5e601dfe2f 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainActivity.kt +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainActivity.kt @@ -121,13 +121,17 @@ class MainActivity : AppCompatActivity(), MainView, OnRefreshListener, ThemeProv override fun onCreateOptionsMenu(menu: Menu): Boolean { menuInflater.inflate(R.menu.menu_game_grid, menu) + return true + } + + override fun onPrepareOptionsMenu(menu: Menu): Boolean { if (WiiUtils.isSystemMenuInstalled()) { val resId = if (WiiUtils.isSystemMenuvWii()) R.string.grid_menu_load_vwii_system_menu_installed else R.string.grid_menu_load_wii_system_menu_installed menu.findItem(R.id.menu_load_wii_system_menu).title = getString(resId, WiiUtils.getSystemMenuVersion()) } - return true + return super.onPrepareOptionsMenu(menu) } /**