diff options
Diffstat (limited to 'plugins/commonui/init.lua')
-rw-r--r-- | plugins/commonui/init.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/commonui/init.lua b/plugins/commonui/init.lua index 064d87c2c5e..5219e7dbb9e 100644 --- a/plugins/commonui/init.lua +++ b/plugins/commonui/init.lua @@ -106,7 +106,7 @@ function commonui.input_selection_menu(action, title, filter) function menu:handle(index, event) local selection - if (event == 'cancel') or ((index == input_item_cancel) and (event == 'select')) then + if (event == 'back') or ((index == input_item_cancel) and (event == 'select')) then action(nil) return true elseif event == 'select' then @@ -177,16 +177,18 @@ function commonui.switch_polling_helper(starting_sequence) if uiinput:pressed(cancel) then -- UI_CANCEL pressed, abort machine:popmessage() + uiinput:reset() if (not poller.modified) or (modified_ticks == emu.osd_ticks()) then -- cancelled immediately - self.sequence = nil - return true -- TODO: communicate this better? + self.sequence = nil -- TODO: communicate this better? + return true else -- entered something before cancelling self.sequence = nil return true end elseif poller:poll() then + uiinput:reset() if poller.valid then -- valid sequence entered machine:popmessage() |