diff options
| author | JosJuice <josjuice@gmail.com> | 2024-02-11 10:58:42 +0100 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2024-02-11 10:58:42 +0100 |
| commit | 48ae52976241e446b3ed7ad77bba7914005dd1df (patch) | |
| tree | a206edbd9aae74082ebbc9150cc4056ede6a9d5e /Source/Android/app/src/main/java | |
| parent | a50ab40a5fbf4acb179a4c17da5f68a6e7cbf09e (diff) | |
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.
Diffstat (limited to 'Source/Android/app/src/main/java')
| -rw-r--r-- | Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainActivity.kt | 6 |
1 files changed, 5 insertions, 1 deletions
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) } /** |
