mirror of
https://github.com/holub/mame
synced 2025-07-04 01:18:59 +03:00
uimain.c: fixed handling of slot options which have only internal options available (and hence
are not configurable by the end-user) [Fabio Priuli]
This commit is contained in:
parent
6d7b97aca4
commit
1e5fe7c8ed
@ -53,6 +53,14 @@ device_t* device_slot_interface::get_card_device()
|
|||||||
return dev;
|
return dev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const bool device_slot_interface::all_internal()
|
||||||
|
{
|
||||||
|
for (int i = 0; m_slot_interfaces && m_slot_interfaces[i].name != NULL; i++)
|
||||||
|
if (!m_slot_interfaces[i].internal)
|
||||||
|
return FALSE;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
device_slot_card_interface::device_slot_card_interface(const machine_config &mconfig, device_t &device)
|
device_slot_card_interface::device_slot_card_interface(const machine_config &mconfig, device_t &device)
|
||||||
: device_interface(device)
|
: device_interface(device)
|
||||||
{
|
{
|
||||||
|
@ -59,6 +59,7 @@ public:
|
|||||||
const void *default_config() const { return m_default_config; }
|
const void *default_config() const { return m_default_config; }
|
||||||
const UINT32 default_clock() const { return m_default_clock; }
|
const UINT32 default_clock() const { return m_default_clock; }
|
||||||
const bool fixed() const { return m_fixed; }
|
const bool fixed() const { return m_fixed; }
|
||||||
|
const bool all_internal();
|
||||||
device_t* get_card_device();
|
device_t* get_card_device();
|
||||||
protected:
|
protected:
|
||||||
const char *m_default_card;
|
const char *m_default_card;
|
||||||
|
@ -465,7 +465,7 @@ void ui_menu_slot_devices::populate()
|
|||||||
// do no display fixed slots
|
// do no display fixed slots
|
||||||
if (slot->fixed()) title = slot->get_default_card();
|
if (slot->fixed()) title = slot->get_default_card();
|
||||||
if (title==NULL) title = "";
|
if (title==NULL) title = "";
|
||||||
item_append(slot->device().tag()+1, strcmp(title,"")==0 ? "------" : title, slot->fixed() ? 0 : (MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW), (void *)slot);
|
item_append(slot->device().tag()+1, strcmp(title,"")==0 ? "------" : title, (slot->fixed() || slot->all_internal()) ? 0 : (MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW), (void *)slot);
|
||||||
}
|
}
|
||||||
item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
|
item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
|
||||||
item_append("Reset", NULL, 0, NULL);
|
item_append("Reset", NULL, 0, NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user