mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-16 00:02:23 +02:00
Merge origin/main into dev; resolve Game.lua gamepad speed-hotkey conflict
This commit is contained in:
+9
-6
@@ -574,7 +574,7 @@ function Game:keypressed(key)
|
||||
return
|
||||
elseif key == "1" then
|
||||
-- cycle GAME SPEED (0.25X → 200X, logic only; audio unaffected);
|
||||
-- R2/L2 on gamepad do the same (see gamepadpressed)
|
||||
-- shoulders/triggers on gamepad do the same (see gamepadpressed)
|
||||
self:_cycleSpeed(1)
|
||||
return
|
||||
elseif key == "2" then
|
||||
@@ -666,14 +666,17 @@ function Game:gamepadpressed(joystick, button)
|
||||
end)
|
||||
selectHeld = ok and down == true
|
||||
end
|
||||
-- shoulder buttons cycle GAME SPEED (R2/rightshoulder = faster,
|
||||
-- L2/leftshoulder = slower; same as keyboard hotkey 1). Skip while
|
||||
-- Select is held so Select+L can reach displayChordDigit ("7").
|
||||
-- shoulder buttons and analog triggers cycle GAME SPEED (R1/RB or
|
||||
-- R2/RT = faster, L1/LB or L2/LT = slower; same as keyboard hotkey
|
||||
-- 1). LÖVE reports an analog trigger as gamepadpressed once it
|
||||
-- crosses the press threshold, so a trigger pull lands here like any
|
||||
-- other pad button. Skip while Select is held so Select+L can reach
|
||||
-- displayChordDigit ("7").
|
||||
if not selectHeld then
|
||||
if button == "rightshoulder" then
|
||||
if button == "rightshoulder" or button == "righttrigger" then
|
||||
self:_cycleSpeed(1)
|
||||
return
|
||||
elseif button == "leftshoulder" then
|
||||
elseif button == "leftshoulder" or button == "lefttrigger" then
|
||||
self:_cycleSpeed(-1)
|
||||
return
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user