summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/luaengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/mame/luaengine.cpp')
-rw-r--r--src/frontend/mame/luaengine.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/frontend/mame/luaengine.cpp b/src/frontend/mame/luaengine.cpp
index 4798d7ca9d4..831f445faa5 100644
--- a/src/frontend/mame/luaengine.cpp
+++ b/src/frontend/mame/luaengine.cpp
@@ -28,6 +28,7 @@
#include "uiinput.h"
#include "corestr.h"
+#include "notifier.h"
#include <cstring>
#include <thread>
@@ -741,6 +742,10 @@ void lua_engine::initialize()
[] (device_t &dev, int maxdepth) { return devenum<slot_interface_enumerator>(dev, maxdepth); });
+ auto notifier_subscription_type = sol().registry().new_usertype<util::notifier_subscription>("notifier_subscription", sol::no_constructor);
+ notifier_subscription_type["unsubscribe"] = &util::notifier_subscription::reset;
+ notifier_subscription_type["is_active"] = sol::property(&util::notifier_subscription::operator bool);
+
auto attotime_type = emu.new_usertype<attotime>(
"attotime",
sol::call_constructor, sol::constructors<attotime(), attotime(seconds_t, attoseconds_t), attotime(attotime const &)>());