-
For older versions of MAME that still rely on |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
You can’t manage subscriptions created with the For example: function on_frame()
-- do something here
end
emu.register_frame(function () on_frame() end)
-- replace frame function with one that does nothing
on_frame = function () end Note that all the callbacks will still be called, so it’s not a great idea to try and subscribe and unsubscribe numerous times like this. |
Beta Was this translation helpful? Give feedback.
register_start
,register_frame
, etc. are deprecated and will be removed at some point. You should useadd_machine_reset_notifier
,add_machine_frame_notifier
, etc. (see the Emulator Interface documentation). These functions return notifier subscriptions which allow unsubscribing.You can’t manage subscriptions created with the
register_X
functions. The closest you can do is to subscribe using an anonymous trampoline function that calls the real function by name, and then reassign the name with a function that does nothing (or does something else) when you no longer need it.For example: