diff options
author | 2016-02-22 09:52:47 +0100 | |
---|---|---|
committer | 2016-02-22 09:52:47 +0100 | |
commit | 25dca0c6719c55bd234aea0873a935b0ed929b07 (patch) | |
tree | 352c3138ae88627bf9a1ab38f7bca07d4c18361a | |
parent | b2a230cd150d4e03ef278def20e4f594ea0412d7 (diff) | |
parent | 118abc08ef84d6a15e9019bacbc873dc4b3ccee4 (diff) |
Merge pull request #633 from motoschifo/master
Fix reset of cheats when entering autofire menu
-rw-r--r-- | src/emu/ui/cheatopt.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/emu/ui/cheatopt.cpp b/src/emu/ui/cheatopt.cpp index 1d13f8e8c94..6de3cb55936 100644 --- a/src/emu/ui/cheatopt.cpp +++ b/src/emu/ui/cheatopt.cpp @@ -34,16 +34,15 @@ void ui_menu_cheat::handle() machine().popmessage(nullptr); /* handle reset all + reset all cheats for reload all option */ - if (menu_event->itemref < ITEMREF_CHEATS_FIRST_ITEM && menu_event->iptkey == IPT_UI_SELECT) + if ((menu_event->itemref == ITEMREF_CHEATS_RESET_ALL || menu_event->itemref == ITEMREF_CHEATS_RELOAD_ALL) && menu_event->iptkey == IPT_UI_SELECT) { for (cheat_entry *curcheat = machine().cheat().first(); curcheat != nullptr; curcheat = curcheat->next()) if (curcheat->select_default_state()) changed = true; } - /* handle individual cheats */ - else if (menu_event->itemref > ITEMREF_CHEATS_FIRST_ITEM) + else if (menu_event->itemref >= ITEMREF_CHEATS_FIRST_ITEM) { cheat_entry *curcheat = reinterpret_cast<cheat_entry *>(menu_event->itemref); const char *string; |