summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2021-04-15 22:48:56 +0200
committer hap <happppp@users.noreply.github.com>2021-04-15 22:49:06 +0200
commit0e8a9b2f92566ff201fe8efbfff079f420b656da (patch)
treef17caa8d19051508b714fc23ffc6026589a43b86
parentb8a8aa1a26b67ace1c6402c4b7c57a9f6a2776d6 (diff)
ui: hide child nodes (collapse menu) if a .lay collection is disabled
-rw-r--r--src/frontend/mame/ui/videoopt.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/frontend/mame/ui/videoopt.cpp b/src/frontend/mame/ui/videoopt.cpp
index 8d5ccbca88c..20e598d1b4d 100644
--- a/src/frontend/mame/ui/videoopt.cpp
+++ b/src/frontend/mame/ui/videoopt.cpp
@@ -162,7 +162,8 @@ void menu_video_options::populate(float &customtop, float &custombottom)
bool eclipsed(false);
for (auto it = toggles.begin(); !eclipsed && (toggle != it); ++it)
eclipsed = ((current_mask & it->mask()) != it->mask()) && ((toggle_mask & it->mask()) == it->mask());
- item_append_on_off(toggle->name(), enabled, eclipsed ? (FLAG_INVERT | FLAG_DISABLE) : 0U, reinterpret_cast<void *>(ITEM_TOGGLE_FIRST + ref));
+ if (!eclipsed)
+ item_append_on_off(toggle->name(), enabled, 0U, reinterpret_cast<void *>(ITEM_TOGGLE_FIRST + ref));
}
item_append(menu_item_type::SEPARATOR);
}