summaryrefslogtreecommitdiffstats
path: root/src/frontend/mame/luaengine_render.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2020-12-27 01:32:37 +1100
committer Vas Crabb <vas@vastheman.com>2020-12-27 01:32:37 +1100
commit9e36b6a6d951ea6f2d72cab874c3c8e72d001001 (patch)
treec41bfd0c1b499d790c4091eb266caf6955219fc1 /src/frontend/mame/luaengine_render.cpp
parent509c946736b5f02cac84d19f2cde4e966d637a2c (diff)
More Lua interface cleanup - it's simpler with cleaner underlyng APIs.
Made the sound manager mute controls readable, and got rid of system enable since it just controls system mute anyway. This was causing confusion: phantom2 was trying to use both independentlyt casuing the mute bit to be ignored. THe Lua interface changes are mostly changing methods to properties, some renames to make things clearer, and some additional properties for better control over snapshots.
Diffstat (limited to 'src/frontend/mame/luaengine_render.cpp')
-rw-r--r--src/frontend/mame/luaengine_render.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/frontend/mame/luaengine_render.cpp b/src/frontend/mame/luaengine_render.cpp
index b910a717561..8a84fcc4e82 100644
--- a/src/frontend/mame/luaengine_render.cpp
+++ b/src/frontend/mame/luaengine_render.cpp
@@ -348,12 +348,12 @@ void lua_engine::initialize_render(sol::table &emu)
}
};
layout_view_item_type["id"] = sol::property(
- [this] (layout_view::item &i) -> sol::object
+ [] (layout_view::item &i, sol::this_state s) -> sol::object
{
if (i.id().empty())
- return sol::make_object(sol(), sol::lua_nil);
+ return sol::lua_nil;
else
- return sol::make_object(sol(), i.id());
+ return sol::make_object(s, i.id());
});
layout_view_item_type["bounds_animated"] = sol::property(&layout_view::item::bounds_animated);
layout_view_item_type["color_animated"] = sol::property(&layout_view::item::color_animated);