mirror of
https://github.com/holub/mame
synced 2025-04-28 19:14:55 +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) {
|
"screens", sol::property([this](running_machine &r) {
|
||||||
sol::table table = sol().create_table();
|
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.configured() && sc.started() && sc.type())
|
||||||
if (sc && sc->configured() && sc->started() && sc->type())
|
table[sc.tag()] = ≻
|
||||||
table[sc->tag()] = sc;
|
|
||||||
}
|
}
|
||||||
return table;
|
return table;
|
||||||
}),
|
}),
|
||||||
|
Loading…
Reference in New Issue
Block a user