plugins/cheat, plugins/autofire: only time out input sequence entry if nothing is entered (nw)

This commit is contained in:
Vas Crabb 2019-11-22 02:32:29 +11:00
parent 3c939b202f
commit c38f63c10a
2 changed files with 2 additions and 2 deletions

View File

@ -113,7 +113,7 @@ local function poll_for_hotkey()
input:seq_poll_start('switch')
local time = os.clock()
local clearmsg = true
while (not input:seq_poll()) and (os.clock() < time + 1) do
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
manager:machine():popmessage(_("Invalid sequence entered"))

View File

@ -537,7 +537,7 @@ function cheat.startplugin()
input:seq_poll_start("switch")
local time = os.clock()
local clearmsg = true
while (not input:seq_poll()) and (os.clock() < time + 1) do
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
manager:machine():popmessage(_("Invalid sequence entered"))