mirror of
https://github.com/holub/mame
synced 2025-04-18 22:49:58 +03:00
plugins: Ensure state is destroyed on stop.
This commit is contained in:
parent
8c6cb643e3
commit
dc33e01896
@ -40,7 +40,7 @@ function inputmacro.startplugin()
|
||||
end
|
||||
|
||||
local function process_frame()
|
||||
previous_inputs = active_inputs
|
||||
local previous_inputs = active_inputs
|
||||
active_inputs = { }
|
||||
|
||||
for index, macro in ipairs(macros) do
|
||||
@ -98,8 +98,6 @@ function inputmacro.startplugin()
|
||||
end
|
||||
|
||||
local function start()
|
||||
menu = nil
|
||||
active_inputs = { }
|
||||
input = manager.machine.input
|
||||
local persister = require('inputmacro/inputmacro_persist')
|
||||
macros = persister.load_settings()
|
||||
@ -108,6 +106,10 @@ function inputmacro.startplugin()
|
||||
local function stop()
|
||||
local persister = require('inputmacro/inputmacro_persist')
|
||||
persister:save_settings(macros)
|
||||
|
||||
macros = { }
|
||||
active_inputs = { }
|
||||
menu = nil
|
||||
end
|
||||
|
||||
local function menu_callback(index, event)
|
||||
|
Loading…
Reference in New Issue
Block a user