mirror of
https://github.com/holub/mame
synced 2025-04-27 10:43:07 +03:00
Fix listsamples and one other potential problematic place, and fixed better devctrl (nw)
This commit is contained in:
parent
32b682c9b3
commit
dd1e28e513
@ -148,7 +148,7 @@ int cli_frontend::execute(int argc, char **argv)
|
|||||||
|
|
||||||
machine_config config(*system, m_options);
|
machine_config config(*system, m_options);
|
||||||
software_list_device_iterator iter(config.root_device());
|
software_list_device_iterator iter(config.root_device());
|
||||||
if (iter.first() == NULL)
|
if (iter.count() == 0)
|
||||||
throw emu_fatalerror(MAMERR_FATALERROR, "Error: unknown option: %s\n", m_options.software_name());
|
throw emu_fatalerror(MAMERR_FATALERROR, "Error: unknown option: %s\n", m_options.software_name());
|
||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
@ -550,7 +550,7 @@ void cli_frontend::listsamples(const char *gamename)
|
|||||||
{
|
{
|
||||||
// see if we have samples
|
// see if we have samples
|
||||||
samples_device_iterator iter(drivlist.config().root_device());
|
samples_device_iterator iter(drivlist.config().root_device());
|
||||||
if (iter.first() == NULL)
|
if (iter.count() == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// print a header
|
// print a header
|
||||||
|
@ -46,9 +46,8 @@ ui_menu_device_control<_DeviceType>::ui_menu_device_control(running_machine &mac
|
|||||||
: ui_menu(machine, container)
|
: ui_menu(machine, container)
|
||||||
{
|
{
|
||||||
iterator iter(machine.root_device());
|
iterator iter(machine.root_device());
|
||||||
|
m_count = iter.count();
|
||||||
m_device = device ? device : iter.first();
|
m_device = device ? device : iter.first();
|
||||||
iterator iter_cnt(machine.root_device());
|
|
||||||
m_count = iter_cnt.count();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user