mirror of
https://github.com/holub/mame
synced 2025-07-02 00:29:37 +03:00
plugins/cheat, plugins/autofire: only time out input sequence entry if nothing is entered (nw)
This commit is contained in:
parent
3c939b202f
commit
c38f63c10a
@ -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"))
|
||||
|
@ -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"))
|
||||
|
Loading…
Reference in New Issue
Block a user