mirror of
https://github.com/holub/mame
synced 2025-07-12 21:19:14 +03:00
Small core changes to enable making slot device also a image device (no whatsnew)
This commit is contained in:
parent
54f84d3945
commit
e1fbe66543
@ -46,7 +46,7 @@ public:
|
||||
|
||||
static void static_set_slot_info(device_t &device, const slot_interface *slots_info, const char *default_card,const input_device_default *default_input);
|
||||
const slot_interface* get_slot_interfaces() const { return m_slot_interfaces; };
|
||||
const char * get_default_card() const { return m_default_card; };
|
||||
virtual const char * get_default_card(emu_options &options) const { return m_default_card; };
|
||||
const input_device_default *input_ports_defaults() const { return m_input_defaults; }
|
||||
device_t* get_card_device();
|
||||
protected:
|
||||
|
@ -251,7 +251,7 @@ bool emu_options::add_slot_options(bool isfirst)
|
||||
entry[0].name = slot->device().tag();
|
||||
entry[0].description = NULL;
|
||||
entry[0].flags = OPTION_STRING | OPTION_FLAG_DEVICE;
|
||||
entry[0].defvalue = (slot->get_slot_interfaces() != NULL) ? slot->get_default_card() : NULL;
|
||||
entry[0].defvalue = (slot->get_slot_interfaces() != NULL) ? slot->get_default_card(*this) : NULL;
|
||||
add_entries(entry, true);
|
||||
|
||||
added = true;
|
||||
@ -345,6 +345,7 @@ bool emu_options::parse_command_line(int argc, char *argv[], astring &error_stri
|
||||
remove_device_options();
|
||||
add_device_options(true);
|
||||
bool isfirst = true;
|
||||
result = core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
|
||||
while (add_slot_options(isfirst)) {
|
||||
result = core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
|
||||
add_device_options(false);
|
||||
|
@ -1107,9 +1107,9 @@ void info_xml_creator::output_slots()
|
||||
{
|
||||
fprintf(m_output, "\t\t\t<slotoption");
|
||||
fprintf(m_output, " name=\"%s\"", xml_normalize_string(intf[i].name));
|
||||
if (slot->get_default_card())
|
||||
if (slot->get_default_card(m_drivlist.options()))
|
||||
{
|
||||
if (slot->get_default_card() == intf[i].name)
|
||||
if (slot->get_default_card(m_drivlist.options()) == intf[i].name)
|
||||
fprintf(m_output, " default=\"yes\"");
|
||||
}
|
||||
fprintf(m_output, "/>\n");
|
||||
|
@ -77,7 +77,7 @@ machine_config::machine_config(const game_driver &gamedrv, emu_options &options)
|
||||
device_t &owner = slot->device();
|
||||
const char *selval = options.value(owner.tag());
|
||||
if (!options.exists(owner.tag()))
|
||||
selval = slot->get_default_card();
|
||||
selval = slot->get_default_card(options);
|
||||
|
||||
if (selval != NULL)
|
||||
for (int i = 0; intf[i].name != NULL; i++)
|
||||
|
Loading…
Reference in New Issue
Block a user