summaryrefslogtreecommitdiffstats
path: root/plugins/autofire/autofire_menu.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/autofire/autofire_menu.lua')
-rw-r--r--plugins/autofire/autofire_menu.lua13
1 files changed, 7 insertions, 6 deletions
diff --git a/plugins/autofire/autofire_menu.lua b/plugins/autofire/autofire_menu.lua
index a880d1c5008..4744de1b2ac 100644
--- a/plugins/autofire/autofire_menu.lua
+++ b/plugins/autofire/autofire_menu.lua
@@ -108,26 +108,27 @@ end
-- Borrowed from the cheat plugin
local function poll_for_hotkey()
local input = manager:machine():input()
+ local poller = input:sequence_poller()
manager:machine():popmessage(_('Press button for hotkey or wait to leave unchanged'))
manager:machine():video():frame_update(true)
- input:seq_poll_start('switch')
+ poller:start('switch')
local time = os.clock()
local clearmsg = true
- while (not input:seq_poll()) and (input:seq_poll_modified() or (os.clock() < time + 1)) do
- if input:seq_poll_modified() then
- if not input:seq_poll_valid() then
+ while (not poller:poll()) and (poller.modified or (os.clock() < time + 1)) do
+ if poller.modified then
+ if not poller.valid then
manager:machine():popmessage(_("Invalid sequence entered"))
clearmsg = false
break
end
- manager:machine():popmessage(input:seq_name(input:seq_poll_sequence()))
+ manager:machine():popmessage(input:seq_name(poller.sequence))
manager:machine():video():frame_update(true)
end
end
if clearmsg then
manager:machine():popmessage()
end
- return input:seq_poll_valid() and input:seq_poll_final() or nil
+ return poller.valid and poller.sequence or nil
end
local function handle_configure_menu(index, event)