mirror of
https://github.com/holub/mame
synced 2025-04-25 09:50:04 +03:00
luaengine: use screen_device_iterator rather than first_screen (nw)
This commit is contained in:
parent
3fd745c2a7
commit
5a018f17f3
@ -1181,11 +1181,10 @@ void lua_engine::initialize()
|
||||
}),
|
||||
"screens", sol::property([this](running_machine &r) {
|
||||
sol::table table = sol().create_table();
|
||||
for(device_t *dev = r.first_screen(); dev != nullptr; dev = dev->next())
|
||||
for (screen_device &sc : screen_device_iterator(r.root_device()))
|
||||
{
|
||||
screen_device *sc = dynamic_cast<screen_device *>(dev);
|
||||
if (sc && sc->configured() && sc->started() && sc->type())
|
||||
table[sc->tag()] = sc;
|
||||
if (sc.configured() && sc.started() && sc.type())
|
||||
table[sc.tag()] = ≻
|
||||
}
|
||||
return table;
|
||||
}),
|
||||
|
Loading…
Reference in New Issue
Block a user