summaryrefslogtreecommitdiffstats
path: root/src/frontend/mame
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/mame')
-rw-r--r--src/frontend/mame/luaengine.cpp7
-rw-r--r--src/frontend/mame/ui/submenu.cpp5
-rw-r--r--src/frontend/mame/ui/videoopt.cpp143
-rw-r--r--src/frontend/mame/ui/videoopt.h5
4 files changed, 41 insertions, 119 deletions
diff --git a/src/frontend/mame/luaengine.cpp b/src/frontend/mame/luaengine.cpp
index 3024e9cc20b..b786eaeb5c8 100644
--- a/src/frontend/mame/luaengine.cpp
+++ b/src/frontend/mame/luaengine.cpp
@@ -1925,9 +1925,6 @@ void lua_engine::initialize()
* target.max_update_rate -
* target.view - current target layout view
* target.orientation - current target orientation
- * target.backdrops - enable backdrops
- * target.bezels - enable bezels
- * target.marquees - enable marquees
* target.screen_overlay - enable overlays
* target.zoom - enable zoom
*/
@@ -1947,10 +1944,6 @@ void lua_engine::initialize()
"max_update_rate", sol::property(&render_target::max_update_rate, &render_target::set_max_update_rate),
"view", sol::property(&render_target::view, &render_target::set_view),
"orientation", sol::property(&render_target::orientation, &render_target::set_orientation),
- "backdrops", sol::property(&render_target::backdrops_enabled, &render_target::set_backdrops_enabled),
- "overlays", sol::property(&render_target::overlays_enabled, &render_target::set_overlays_enabled),
- "bezels", sol::property(&render_target::bezels_enabled, &render_target::set_bezels_enabled),
- "marquees", sol::property(&render_target::marquees_enabled, &render_target::set_marquees_enabled),
"screen_overlay", sol::property(&render_target::screen_overlay_enabled, &render_target::set_screen_overlay_enabled),
"zoom", sol::property(&render_target::zoom_to_screen, &render_target::set_zoom_to_screen));
diff --git a/src/frontend/mame/ui/submenu.cpp b/src/frontend/mame/ui/submenu.cpp
index a9134935f7a..f9cff799c1f 100644
--- a/src/frontend/mame/ui/submenu.cpp
+++ b/src/frontend/mame/ui/submenu.cpp
@@ -55,11 +55,6 @@ std::vector<submenu::option> const submenu::advanced_options = {
{ submenu::option_type::HEAD, __("Artwork Options") },
{ submenu::option_type::EMU, __("Artwork Crop"), OPTION_ARTWORK_CROP },
- { submenu::option_type::EMU, __("Use Backdrops"), OPTION_USE_BACKDROPS },
- { submenu::option_type::EMU, __("Use Overlays"), OPTION_USE_OVERLAYS },
- { submenu::option_type::EMU, __("Use Bezels"), OPTION_USE_BEZELS },
- { submenu::option_type::EMU, __("Use Control Panels"), OPTION_USE_CPANELS },
- { submenu::option_type::EMU, __("Use Marquees"), OPTION_USE_MARQUEES },
{ submenu::option_type::HEAD, __("State/Playback Options") },
{ submenu::option_type::EMU, __("Automatic save/restore"), OPTION_AUTOSAVE },
diff --git a/src/frontend/mame/ui/videoopt.cpp b/src/frontend/mame/ui/videoopt.cpp
index 7ee243ec4e2..baa0a265cb6 100644
--- a/src/frontend/mame/ui/videoopt.cpp
+++ b/src/frontend/mame/ui/videoopt.cpp
@@ -71,86 +71,46 @@ void menu_video_options::handle()
{
bool changed = false;
- /* process the menu */
+ // process the menu
const event *menu_event = process(0);
if (menu_event != nullptr && menu_event->itemref != nullptr)
{
switch ((uintptr_t)menu_event->itemref)
{
- /* rotate adds rotation depending on the direction */
- case VIDEO_ITEM_ROTATE:
- if (menu_event->iptkey == IPT_UI_LEFT || menu_event->iptkey == IPT_UI_RIGHT)
- {
- int delta = (menu_event->iptkey == IPT_UI_LEFT) ? ROT270 : ROT90;
- target->set_orientation(orientation_add(delta, target->orientation()));
- if (target->is_ui_target())
- {
- render_container::user_settings settings;
- container().get_user_settings(settings);
- settings.m_orientation = orientation_add(delta ^ ROT180, settings.m_orientation);
- container().set_user_settings(settings);
- }
- changed = true;
- }
- break;
-
- /* layer config bitmasks handle left/right keys the same (toggle) */
- case VIDEO_ITEM_BACKDROPS:
- if (menu_event->iptkey == IPT_UI_LEFT || menu_event->iptkey == IPT_UI_RIGHT)
- {
- target->set_backdrops_enabled(!target->backdrops_enabled());
- changed = true;
- }
- break;
-
- case VIDEO_ITEM_OVERLAYS:
- if (menu_event->iptkey == IPT_UI_LEFT || menu_event->iptkey == IPT_UI_RIGHT)
- {
- target->set_overlays_enabled(!target->overlays_enabled());
- changed = true;
- }
- break;
-
- case VIDEO_ITEM_BEZELS:
- if (menu_event->iptkey == IPT_UI_LEFT || menu_event->iptkey == IPT_UI_RIGHT)
- {
- target->set_bezels_enabled(!target->bezels_enabled());
- changed = true;
- }
- break;
-
- case VIDEO_ITEM_CPANELS:
- if (menu_event->iptkey == IPT_UI_LEFT || menu_event->iptkey == IPT_UI_RIGHT)
- {
- target->set_cpanels_enabled(!target->cpanels_enabled());
- changed = true;
- }
- break;
-
- case VIDEO_ITEM_MARQUEES:
- if (menu_event->iptkey == IPT_UI_LEFT || menu_event->iptkey == IPT_UI_RIGHT)
+ // rotate adds rotation depending on the direction
+ case VIDEO_ITEM_ROTATE:
+ if (menu_event->iptkey == IPT_UI_LEFT || menu_event->iptkey == IPT_UI_RIGHT)
+ {
+ int delta = (menu_event->iptkey == IPT_UI_LEFT) ? ROT270 : ROT90;
+ target->set_orientation(orientation_add(delta, target->orientation()));
+ if (target->is_ui_target())
{
- target->set_marquees_enabled(!target->marquees_enabled());
- changed = true;
+ render_container::user_settings settings;
+ container().get_user_settings(settings);
+ settings.m_orientation = orientation_add(delta ^ ROT180, settings.m_orientation);
+ container().set_user_settings(settings);
}
- break;
+ changed = true;
+ }
+ break;
- case VIDEO_ITEM_ZOOM:
- if (menu_event->iptkey == IPT_UI_LEFT || menu_event->iptkey == IPT_UI_RIGHT)
- {
- target->set_zoom_to_screen(!target->zoom_to_screen());
- changed = true;
- }
- break;
+ // layer config bitmasks handle left/right keys the same (toggle)
+ case VIDEO_ITEM_ZOOM:
+ if (menu_event->iptkey == IPT_UI_LEFT || menu_event->iptkey == IPT_UI_RIGHT)
+ {
+ target->set_zoom_to_screen(!target->zoom_to_screen());
+ changed = true;
+ }
+ break;
- /* anything else is a view item */
- default:
- if (menu_event->iptkey == IPT_UI_SELECT && (int)(uintptr_t)menu_event->itemref >= VIDEO_ITEM_VIEW)
- {
- target->set_view((uintptr_t)menu_event->itemref - VIDEO_ITEM_VIEW);
- changed = true;
- }
- break;
+ // anything else is a view item
+ default:
+ if (menu_event->iptkey == IPT_UI_SELECT && (int)(uintptr_t)menu_event->itemref >= VIDEO_ITEM_VIEW)
+ {
+ target->set_view((uintptr_t)menu_event->itemref - VIDEO_ITEM_VIEW);
+ changed = true;
+ }
+ break;
}
}
@@ -174,56 +134,35 @@ void menu_video_options::populate(float &customtop, float &custombottom)
{
const char *subtext = "";
std::string tempstring;
- int viewnum;
int enabled;
- /* add items for each view */
- for (viewnum = 0; ; viewnum++)
+ // add items for each view
+ for (int viewnum = 0; ; viewnum++)
{
const char *name = target->view_name(viewnum);
if (name == nullptr)
break;
- /* create a string for the item, replacing underscores with spaces */
+ // create a string for the item, replacing underscores with spaces
tempstring.assign(name);
strreplace(tempstring, "_", " ");
item_append(tempstring, "", 0, (void *)(uintptr_t)(VIDEO_ITEM_VIEW + viewnum));
}
- /* add a separator */
+ // add a separator
item_append(menu_item_type::SEPARATOR);
- /* add a rotate item */
+ // add a rotate item
switch (target->orientation())
{
- case ROT0: subtext = "None"; break;
- case ROT90: subtext = "CW 90" UTF8_DEGREES; break;
- case ROT180: subtext = "180" UTF8_DEGREES; break;
- case ROT270: subtext = "CCW 90" UTF8_DEGREES; break;
+ case ROT0: subtext = "None"; break;
+ case ROT90: subtext = "CW 90" UTF8_DEGREES; break;
+ case ROT180: subtext = "180" UTF8_DEGREES; break;
+ case ROT270: subtext = "CCW 90" UTF8_DEGREES; break;
}
item_append(_("Rotate"), subtext, FLAG_LEFT_ARROW | FLAG_RIGHT_ARROW, (void *)VIDEO_ITEM_ROTATE);
- /* backdrop item */
- enabled = target->backdrops_enabled();
- item_append(_("Backdrops"), enabled ? _("Enabled") : _("Disabled"), enabled ? FLAG_LEFT_ARROW : FLAG_RIGHT_ARROW, (void *)VIDEO_ITEM_BACKDROPS);
-
- /* overlay item */
- enabled = target->overlays_enabled();
- item_append(_("Overlays"), enabled ? _("Enabled") : _("Disabled"), enabled ? FLAG_LEFT_ARROW : FLAG_RIGHT_ARROW, (void *)VIDEO_ITEM_OVERLAYS);
-
- /* bezel item */
- enabled = target->bezels_enabled();
- item_append(_("Bezels"), enabled ? _("Enabled") : _("Disabled"), enabled ? FLAG_LEFT_ARROW : FLAG_RIGHT_ARROW, (void *)VIDEO_ITEM_BEZELS);
-
- /* cpanel item */
- enabled = target->cpanels_enabled();
- item_append(_("CPanels"), enabled ? _("Enabled") : _("Disabled"), enabled ? FLAG_LEFT_ARROW : FLAG_RIGHT_ARROW, (void *)VIDEO_ITEM_CPANELS);
-
- /* marquee item */
- enabled = target->marquees_enabled();
- item_append(_("Marquees"), enabled ? _("Enabled") : _("Disabled"), enabled ? FLAG_LEFT_ARROW : FLAG_RIGHT_ARROW, (void *)VIDEO_ITEM_MARQUEES);
-
- /* cropping */
+ // cropping
enabled = target->zoom_to_screen();
item_append(_("View"), enabled ? _("Cropped") : _("Full"), enabled ? FLAG_RIGHT_ARROW : FLAG_LEFT_ARROW, (void *)VIDEO_ITEM_ZOOM);
}
diff --git a/src/frontend/mame/ui/videoopt.h b/src/frontend/mame/ui/videoopt.h
index d920fe55837..c26281ffd1b 100644
--- a/src/frontend/mame/ui/videoopt.h
+++ b/src/frontend/mame/ui/videoopt.h
@@ -36,11 +36,6 @@ public:
private:
enum {
VIDEO_ITEM_ROTATE = 0x80000000,
- VIDEO_ITEM_BACKDROPS,
- VIDEO_ITEM_OVERLAYS,
- VIDEO_ITEM_BEZELS,
- VIDEO_ITEM_CPANELS,
- VIDEO_ITEM_MARQUEES,
VIDEO_ITEM_ZOOM,
VIDEO_ITEM_VIEW
};