summaryrefslogtreecommitdiffstats
path: root/src/frontend/mame/ui/cheatopt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/mame/ui/cheatopt.cpp')
-rw-r--r--src/frontend/mame/ui/cheatopt.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/frontend/mame/ui/cheatopt.cpp b/src/frontend/mame/ui/cheatopt.cpp
index 3982a7c7a33..cb207458ed1 100644
--- a/src/frontend/mame/ui/cheatopt.cpp
+++ b/src/frontend/mame/ui/cheatopt.cpp
@@ -292,19 +292,9 @@ void menu_autofire::populate(float &customtop, float &custombottom)
item_append(menu_item_type::SEPARATOR);
is_first_button = false;
}
+
/* add an autofire item */
- if (!autofire_toggle)
- {
- // item is enabled and can be switched to values on/off
- item_append(field.name(), (settings.autofire ? _("On") : _("Off")),
- (settings.autofire ? FLAG_LEFT_ARROW : FLAG_RIGHT_ARROW), (void *)&field);
- }
- else
- {
- // item is disabled
- item_append(field.name(), (settings.autofire ? _("On") : _("Off")),
- FLAG_DISABLE | FLAG_INVERT, nullptr);
- }
+ item_append_on_off(field.name(), settings.autofire, (autofire_toggle ? FLAG_DISABLE : FLAG_INVERT), (void *)&field);
}
}
}