summaryrefslogtreecommitdiffstats
path: root/src/frontend/mame/ui/mainmenu.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2019-01-14 04:55:29 +1100
committer Vas Crabb <vas@vastheman.com>2019-01-15 03:56:30 +1100
commitae727d2cc640fef650d6c76694b83b159d3065ba (patch)
treec1c5b58eb3a9d51a43737dca62a59b482f7245f2 /src/frontend/mame/ui/mainmenu.cpp
parent8f330896e2f8b1fc8ec54023fb5d134dc8a5c3d3 (diff)
UI cleanup continues:
* Fix crash on builds with fewer than 16 drivers * Fix "available" filter in internal UI * Get rid of some UI globals that shouldn't be global * Better encapsulation in UI * Clean up favourites manager - in particular kill hidden state and O(n) walks * This breaks adding systems/software to favourites from the main tab menu
Diffstat (limited to 'src/frontend/mame/ui/mainmenu.cpp')
-rw-r--r--src/frontend/mame/ui/mainmenu.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/frontend/mame/ui/mainmenu.cpp b/src/frontend/mame/ui/mainmenu.cpp
index 30b2fbae1e0..b9befd90991 100644
--- a/src/frontend/mame/ui/mainmenu.cpp
+++ b/src/frontend/mame/ui/mainmenu.cpp
@@ -123,7 +123,7 @@ void menu_main::populate(float &customtop, float &custombottom)
item_append(menu_item_type::SEPARATOR);
- if (!mame_machine_manager::instance()->favorite().isgame_favorite())
+ if (!mame_machine_manager::instance()->favorite().is_favorite(machine()))
item_append(_("Add To Favorites"), "", 0, (void *)ADD_FAVORITE);
else
item_append(_("Remove From Favorites"), "", 0, (void *)REMOVE_FAVORITE);
@@ -249,12 +249,12 @@ void menu_main::handle()
break;
case ADD_FAVORITE:
- mame_machine_manager::instance()->favorite().add_favorite_game();
+ mame_machine_manager::instance()->favorite().add_favorite(machine());
reset(reset_options::REMEMBER_POSITION);
break;
case REMOVE_FAVORITE:
- mame_machine_manager::instance()->favorite().remove_favorite_game();
+ mame_machine_manager::instance()->favorite().remove_favorite(machine());
reset(reset_options::REMEMBER_POSITION);
break;