Fixed remove favorites via "configure machine" menu. (nw)

This commit is contained in:
dankan1890 2016-09-13 16:25:27 +02:00
parent 4d3d404d17
commit bceb3e34f8
2 changed files with 5 additions and 1 deletions

View File

@ -681,6 +681,7 @@ menu_machine_configure::menu_machine_configure(mame_ui_manager &mui, render_cont
, x0(_x0)
, y0(_y0)
, m_curbios(0)
, m_fav_reset(false)
{
// parse the INI file
std::string error;
@ -690,6 +691,8 @@ menu_machine_configure::menu_machine_configure(mame_ui_manager &mui, render_cont
menu_machine_configure::~menu_machine_configure()
{
if (m_fav_reset && main_filters::actual == FILTER_FAVORITE)
reset_topmost(reset_options::SELECT_FIRST);
}
//-------------------------------------------------
@ -724,9 +727,9 @@ void menu_machine_configure::handle()
mame_machine_manager::instance()->favorite().add_favorite_game(m_drv);
reset(reset_options::REMEMBER_POSITION);
break;
case DELFAV:
mame_machine_manager::instance()->favorite().remove_favorite_game();
m_fav_reset = true;
reset(reset_options::REMEMBER_POSITION);
break;
case CONTROLLER:

View File

@ -165,6 +165,7 @@ private:
s_bios m_bios;
std::size_t m_curbios;
void setup_bios();
bool m_fav_reset;
};
//-------------------------------------------------