summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/emu/emuopts.c3
-rw-r--r--src/lib/util/options.c37
-rw-r--r--src/lib/util/options.h2
3 files changed, 24 insertions, 18 deletions
diff --git a/src/emu/emuopts.c b/src/emu/emuopts.c
index b4cb4522071..6109d8ca21e 100644
--- a/src/emu/emuopts.c
+++ b/src/emu/emuopts.c
@@ -236,6 +236,7 @@ bool emu_options::add_slot_options(bool isfirst)
for (const device_slot_interface *slot = iter.first(); slot != NULL; slot = iter.next())
{
if (slot->fixed()) continue;
+ bool all_internal = slot->all_internal();
// first device? add the header as to be pretty
if (first && isfirst)
{
@@ -252,7 +253,7 @@ bool emu_options::add_slot_options(bool isfirst)
// add the option
entry[0].name = slot->device().tag() + 1;
entry[0].description = NULL;
- entry[0].flags = OPTION_STRING | OPTION_FLAG_DEVICE;
+ entry[0].flags = OPTION_STRING | OPTION_FLAG_DEVICE | all_internal ? OPTION_FLAG_INTERNAL : 0;
entry[0].defvalue = (slot->get_slot_interfaces() != NULL) ? slot->get_default_card() : NULL;
add_entries(entry, true);
diff --git a/src/lib/util/options.c b/src/lib/util/options.c
index 1182550fb36..d89ef85190a 100644
--- a/src/lib/util/options.c
+++ b/src/lib/util/options.c
@@ -512,25 +512,28 @@ const char *core_options::output_ini(astring &buffer, const core_options *diff)
// otherwise, output entries for all non-command items
else if (!curentry->is_command())
{
- // look up counterpart in diff, if diff is specified
- if (diff == NULL || strcmp(value, diff->value(name)) != 0)
+ if ( !curentry->is_internal() )
{
- // output header, if we have one
- if (last_header != NULL)
+ // look up counterpart in diff, if diff is specified
+ if (diff == NULL || strcmp(value, diff->value(name)) != 0)
{
- if (num_valid_headers++)
- buffer.catprintf("\n");
- buffer.catprintf("#\n# %s\n#\n", last_header);
- last_header = NULL;
- }
-
- // and finally output the data, skip if unadorned
- if (!is_unadorned)
- {
- if (strchr(value, ' ') != NULL)
- buffer.catprintf("%-25s \"%s\"\n", name, value);
- else
- buffer.catprintf("%-25s %s\n", name, value);
+ // output header, if we have one
+ if (last_header != NULL)
+ {
+ if (num_valid_headers++)
+ buffer.catprintf("\n");
+ buffer.catprintf("#\n# %s\n#\n", last_header);
+ last_header = NULL;
+ }
+
+ // and finally output the data, skip if unadorned
+ if (!is_unadorned)
+ {
+ if (strchr(value, ' ') != NULL)
+ buffer.catprintf("%-25s \"%s\"\n", name, value);
+ else
+ buffer.catprintf("%-25s %s\n", name, value);
+ }
}
}
}
diff --git a/src/lib/util/options.h b/src/lib/util/options.h
index 8d8ea78a303..28e478afb73 100644
--- a/src/lib/util/options.h
+++ b/src/lib/util/options.h
@@ -70,6 +70,7 @@ const int OPTION_PRIORITY_NORMAL = 100; // normal priority
const int OPTION_PRIORITY_HIGH = 150; // high priority
const int OPTION_PRIORITY_MAXIMUM = 255; // maximum priority
+const UINT32 OPTION_FLAG_INTERNAL = 0x40000000;
//**************************************************************************
@@ -114,6 +115,7 @@ public:
UINT32 flags() const { return m_flags; }
bool is_header() const { return type() == OPTION_HEADER; }
bool is_command() const { return type() == OPTION_COMMAND; }
+ bool is_internal() const { return m_flags & OPTION_FLAG_INTERNAL; }
bool has_range() const { return (m_minimum && m_maximum); }
int priority() const { return m_priority; }