mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
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.
This commit is contained in:
parent
a50ab40a5f
commit
48ae529762
@ -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)
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user