diff options
| author | 2026-01-06 05:01:13 +1100 | |
|---|---|---|
| committer | 2026-01-06 05:01:13 +1100 | |
| commit | cf70b0c19d9189e723826826392cb457d7ec25f9 (patch) | |
| tree | 95f97728820e57d21d8047fdcb84b254061e92cc /plugins/inputmacro/init.lua | |
| parent | 390266f0030ddbe54c79520f0924722776a78413 (diff) | |
-plugins/inputmacro: Added support for non-wrapping analog inputs.
-emu/inputdev.cpp, emu/emuopts.cpp: Removed core off-screen reload hack
now that the same thing can be achieved more flexibly with plugins.
-ui/pluginopt.cpp: Changed the "previos menu" item text to make what it
does more obvious.
Diffstat (limited to 'plugins/inputmacro/init.lua')
| -rw-r--r-- | plugins/inputmacro/init.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/inputmacro/init.lua b/plugins/inputmacro/init.lua index 9c520f3a503..f5e46df4d91 100644 --- a/plugins/inputmacro/init.lua +++ b/plugins/inputmacro/init.lua @@ -2,7 +2,7 @@ -- copyright-holders:Vas Crabb local exports = { name = 'inputmacro', - version = '0.0.1', + version = '0.0.2', description = 'Input macro plugin', license = 'BSD-3-Clause', author = { name = 'Vas Crabb' } } @@ -41,7 +41,7 @@ function inputmacro.startplugin() local function activate_inputs(inputs) for index, input in ipairs(inputs) do if input.field then - active_inputs[string.format('%s.%d.%d', input.port, input.mask, input.type)] = input.field + active_inputs[string.format('%s.%d.%d', input.port, input.mask, input.type)] = { input.field, input.value or 1 } end end end @@ -94,12 +94,12 @@ function inputmacro.startplugin() end end - for key, field in pairs(active_inputs) do - field:set_value(1) + for key, input in pairs(active_inputs) do + input[1]:set_value(input[2]) end - for key, field in pairs(previous_inputs) do + for key, input in pairs(previous_inputs) do if not active_inputs[key] then - field:clear_value() + input[1]:clear_value() end end end |
