mirror of
https://github.com/holub/mame
synced 2025-07-08 03:12:37 +03:00
ui: remove separator between Add/remove favorite and About MAME, ugly even though the 2 are unrelated,
fix reset(reset_options::REMEMBER_REF); with add/remove favorite
This commit is contained in:
parent
a3c19ba0ac
commit
87956a8ba2
@ -101,8 +101,8 @@ bool menu_cheat::handle(event const *ev)
|
||||
mame_machine_manager::instance()->cheat().reload();
|
||||
|
||||
// display the reloaded cheats
|
||||
reset(reset_options::REMEMBER_REF);
|
||||
machine().popmessage(_("All cheats reloaded"));
|
||||
changed = true;
|
||||
}
|
||||
|
||||
// if things changed, update
|
||||
|
@ -65,8 +65,7 @@ enum : unsigned {
|
||||
BARCODE_READ,
|
||||
PTY_INFO,
|
||||
EXTERNAL_DATS,
|
||||
ADD_FAVORITE,
|
||||
REMOVE_FAVORITE,
|
||||
FAVORITE,
|
||||
ABOUT,
|
||||
QUIT_GAME,
|
||||
DISMISS,
|
||||
@ -180,11 +179,9 @@ void menu_main::populate()
|
||||
item_append(menu_item_type::SEPARATOR);
|
||||
|
||||
if (!mame_machine_manager::instance()->favorite().is_favorite(machine()))
|
||||
item_append(_("menu-main", "Add To Favorites"), 0, (void *)ADD_FAVORITE);
|
||||
item_append(_("menu-main", "Add To Favorites"), 0, (void *)FAVORITE);
|
||||
else
|
||||
item_append(_("menu-main", "Remove From Favorites"), 0, (void *)REMOVE_FAVORITE);
|
||||
|
||||
item_append(menu_item_type::SEPARATOR);
|
||||
item_append(_("menu-main", "Remove From Favorites"), 0, (void *)FAVORITE);
|
||||
|
||||
item_append(string_format(_("menu-main", "About %1$s"), emulator_info::get_appname()), 0, (void *)ABOUT);
|
||||
|
||||
@ -306,15 +303,16 @@ bool menu_main::handle(event const *ev)
|
||||
menu::stack_push<menu_dats_view>(ui(), container());
|
||||
break;
|
||||
|
||||
case ADD_FAVORITE:
|
||||
mame_machine_manager::instance()->favorite().add_favorite(machine());
|
||||
reset(reset_options::REMEMBER_REF);
|
||||
break;
|
||||
|
||||
case REMOVE_FAVORITE:
|
||||
mame_machine_manager::instance()->favorite().remove_favorite(machine());
|
||||
case FAVORITE:
|
||||
{
|
||||
favorite_manager &mfav = mame_machine_manager::instance()->favorite();
|
||||
if (mfav.is_favorite(machine()))
|
||||
mfav.remove_favorite(machine());
|
||||
else
|
||||
mfav.add_favorite(machine());
|
||||
reset(reset_options::REMEMBER_REF);
|
||||
break;
|
||||
}
|
||||
|
||||
case QUIT_GAME:
|
||||
stack_pop();
|
||||
|
Loading…
Reference in New Issue
Block a user