Previous 199869 Revisions Next

r21274 Thursday 21st February, 2013 at 19:56:46 UTC by Wilbert Pol
Don't save out internally determined settings to .ini files. (nw)
[src/emu]emuopts.c
[src/lib/util]options.c options.h

trunk/src/lib/util/options.c
r21273r21274
512512      // otherwise, output entries for all non-command items
513513      else if (!curentry->is_command())
514514      {
515         // look up counterpart in diff, if diff is specified
516         if (diff == NULL || strcmp(value, diff->value(name)) != 0)
515         if ( !curentry->is_internal() )
517516         {
518            // output header, if we have one
519            if (last_header != NULL)
517            // look up counterpart in diff, if diff is specified
518            if (diff == NULL || strcmp(value, diff->value(name)) != 0)
520519            {
521               if (num_valid_headers++)
522                  buffer.catprintf("\n");
523               buffer.catprintf("#\n# %s\n#\n", last_header);
524               last_header = NULL;
525            }
520               // output header, if we have one
521               if (last_header != NULL)
522               {
523                  if (num_valid_headers++)
524                     buffer.catprintf("\n");
525                  buffer.catprintf("#\n# %s\n#\n", last_header);
526                  last_header = NULL;
527               }
526528
527            // and finally output the data, skip if unadorned
528            if (!is_unadorned)
529            {
530               if (strchr(value, ' ') != NULL)
531                  buffer.catprintf("%-25s \"%s\"\n", name, value);
532               else
533                  buffer.catprintf("%-25s %s\n", name, value);
529               // and finally output the data, skip if unadorned
530               if (!is_unadorned)
531               {
532                  if (strchr(value, ' ') != NULL)
533                     buffer.catprintf("%-25s \"%s\"\n", name, value);
534                  else
535                     buffer.catprintf("%-25s %s\n", name, value);
536               }
534537            }
535538         }
536539      }
trunk/src/lib/util/options.h
r21273r21274
7070const int OPTION_PRIORITY_HIGH      = 150;          // high priority
7171const int OPTION_PRIORITY_MAXIMUM   = 255;          // maximum priority
7272
73const UINT32 OPTION_FLAG_INTERNAL = 0x40000000;
7374
7475
7576//**************************************************************************
r21273r21274
114115      UINT32 flags() const { return m_flags; }
115116      bool is_header() const { return type() == OPTION_HEADER; }
116117      bool is_command() const { return type() == OPTION_COMMAND; }
118      bool is_internal() const { return m_flags & OPTION_FLAG_INTERNAL; }
117119      bool has_range() const { return (m_minimum && m_maximum); }
118120      int priority() const { return m_priority; }
119121
trunk/src/emu/emuopts.c
r21273r21274
236236   for (const device_slot_interface *slot = iter.first(); slot != NULL; slot = iter.next())
237237   {
238238      if (slot->fixed()) continue;
239      bool all_internal = slot->all_internal();
239240      // first device? add the header as to be pretty
240241      if (first && isfirst)
241242      {
r21273r21274
252253         // add the option
253254         entry[0].name = slot->device().tag() + 1;
254255         entry[0].description = NULL;
255         entry[0].flags = OPTION_STRING | OPTION_FLAG_DEVICE;
256         entry[0].flags = OPTION_STRING | OPTION_FLAG_DEVICE | all_internal ? OPTION_FLAG_INTERNAL : 0;
256257         entry[0].defvalue = (slot->get_slot_interfaces() != NULL) ? slot->get_default_card() : NULL;
257258         add_entries(entry, true);
258259

Previous 199869 Revisions Next


© 1997-2024 The MAME Team