From e6844a68b61477d1c0a1d225d75c04c7e6678495 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Sat, 25 Nov 2023 08:51:14 +1100 Subject: implement play/pause --- src/lua/include/property.hpp | 2 ++ src/lua/property.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/lua') diff --git a/src/lua/include/property.hpp b/src/lua/include/property.hpp index 207696bd..c1dcf44b 100644 --- a/src/lua/include/property.hpp +++ b/src/lua/include/property.hpp @@ -26,6 +26,8 @@ class Property { Property(const LuaValue&); Property(const LuaValue&, std::function); + auto Get() -> const LuaValue& { return value_; } + auto IsTwoWay() -> bool { return cb_.has_value(); } auto PushValue(lua_State& s) -> int; diff --git a/src/lua/property.cpp b/src/lua/property.cpp index 3e492237..b424a866 100644 --- a/src/lua/property.cpp +++ b/src/lua/property.cpp @@ -221,7 +221,7 @@ auto Property::PopValue(lua_State& s) -> bool { } break; case LUA_TBOOLEAN: - new_val = lua_toboolean(&s, 2); + new_val = static_cast(lua_toboolean(&s, 2)); break; case LUA_TSTRING: new_val = lua_tostring(&s, 2); -- cgit v1.2.3