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
|
if e.type == "key" then
|
||||||
-- function keys, escape, and tab are reserved and can't be remapped
|
-- 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
|
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
|
elseif self.input_state > #configurable_inputs then
|
||||||
if e.scancode == "return" or e.input == "" then
|
if e.scancode == "return" or e.input == "menu_decide" then
|
||||||
-- save new input, then load next scene
|
SETTINGS.input.keys = self.new_input
|
||||||
local had_config = SETTINGS.input ~= nil
|
SCENE = SETTINGS.firstTime and TitleScene() or InputConfigScene()
|
||||||
if not SETTINGS.input then SETTINGS.input = {} end
|
SETTINGS.firstTime = false
|
||||||
SETTINGS.input.joysticks = self.new_input
|
|
||||||
SCENE = had_config and InputConfigScene() or TitleScene()
|
|
||||||
elseif e.scancode == "delete" or e.scancode == "backspace" then
|
elseif e.scancode == "delete" or e.scancode == "backspace" then
|
||||||
-- retry
|
-- retry
|
||||||
self.input_state = 1
|
self.input_state = 1
|
||||||
|
|||||||
Reference in New Issue
Block a user