mirror of
https://gitea.com/SweetSea-ButImNotSweet/tromi_mobile.git
synced 2025-01-08 17:33:09 +08:00
Attempt to fix soft lock in stick conf. screen
This commit is contained in:
@@ -72,14 +72,12 @@ function StickConfigScene:onInputPress(e)
|
||||
if e.type == "key" then
|
||||
-- function keys, escape, and tab are reserved and can't be remapped
|
||||
if e.scancode == "escape" or (self.input_state > #configurable_inputs and e.input == "menu_back") then
|
||||
SCENE = InputConfigScene()
|
||||
SCENE = InputConfigScene(SETTINGS.firstTime)
|
||||
elseif self.input_state > #configurable_inputs then
|
||||
if e.scancode == "return" or e.input == "" then
|
||||
-- save new input, then load next scene
|
||||
local had_config = SETTINGS.input ~= nil
|
||||
if not SETTINGS.input then SETTINGS.input = {} end
|
||||
SETTINGS.input.joysticks = self.new_input
|
||||
SCENE = had_config and InputConfigScene() or TitleScene()
|
||||
if e.scancode == "return" or e.input == "menu_decide" then
|
||||
SETTINGS.input.keys = self.new_input
|
||||
SCENE = SETTINGS.firstTime and TitleScene() or InputConfigScene()
|
||||
SETTINGS.firstTime = false
|
||||
elseif e.scancode == "delete" or e.scancode == "backspace" then
|
||||
-- retry
|
||||
self.input_state = 1
|
||||
|
||||
Reference in New Issue
Block a user