summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/softlist_dev.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2020-11-25 19:18:26 +1100
committer Vas Crabb <vas@vastheman.com>2020-11-25 19:18:26 +1100
commitec8042864703f9ce6cc9b0cf528e6a8528104b89 (patch)
tree427556c7d86c7cab5f136aff7f0675adc443144b /src/emu/softlist_dev.cpp
parent8ea35743e40bd6dc01e50a0a21524db7b0ad203e (diff)
Fairly significant overhaul of Lua engine and some cleanup.
The things that were previously called device iterators are not iterators in the C++ sense of the word. This is confusing for newcomers. These have been renamed to be device enumerators. Several Lua methods and properties that previously returned tables now return lightweight wrappers for the underlying objects. This means creating them is a lot faster, but you can't modify them, and the performance characteristics of different operations varies. The render manager's target list uses 1-based indexing to be more like idiomatic Lua. It's now possible to create a device enumerator on any device, and then get subdevices (or sibling devices) using a relative tag. Much more render/layout functionality has been exposed to Lua. Layout scripts now have access to the layout file and can directly set the state of an item with no bindings, or register callbacks to obtain state. Some things that were previously methods are now read-only properties. Layout files are no longer required to supply a "name". This was problematic because the same layout file could be loaded for multiple instances of the same device, and each instance of the layout file should use the correct inputs (and in the future outputs) for the device instance it's associated with. This should also fix video output with MSVC builds by avoiding delegates that return things that don't fit in a register.
Diffstat (limited to 'src/emu/softlist_dev.cpp')
-rw-r--r--src/emu/softlist_dev.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/emu/softlist_dev.cpp b/src/emu/softlist_dev.cpp
index e2842b315b4..a69f6ccab00 100644
--- a/src/emu/softlist_dev.cpp
+++ b/src/emu/softlist_dev.cpp
@@ -189,7 +189,7 @@ void software_list_device::release()
software_list_device *software_list_device::find_by_name(const machine_config &config, const std::string &name)
{
// iterate over each device in the system and find a match
- for (software_list_device &swlistdev : software_list_device_iterator(config.root_device()))
+ for (software_list_device &swlistdev : software_list_device_enumerator(config.root_device()))
if (swlistdev.list_name() == name)
return &swlistdev;
return nullptr;
@@ -205,7 +205,7 @@ software_list_device *software_list_device::find_by_name(const machine_config &c
void software_list_device::display_matches(const machine_config &config, const char *interface, const std::string &name)
{
// check if there is at least one software list
- software_list_device_iterator deviter(config.root_device());
+ software_list_device_enumerator deviter(config.root_device());
if (deviter.first() != nullptr)
osd_printf_error("\n\"%s\" approximately matches the following\n"
"supported software items (best match first):\n\n", name.c_str());
@@ -361,7 +361,7 @@ device_image_interface *software_list_device::find_mountable_image(const machine
if (mount != nullptr && strcmp(mount, "no") == 0)
return nullptr;
- for (device_image_interface &image : image_interface_iterator(mconfig.root_device()))
+ for (device_image_interface &image : image_interface_enumerator(mconfig.root_device()))
{
const char *interface = image.image_interface();
if (interface != nullptr && part.matches_interface(interface) && filter(image))