fix how l1 and r1 buttons should be handled (previously, we weren't saving the relevant state to true when they were pressed, but now we are)

This commit is contained in:
2026-01-20 08:02:14 +00:00
parent ff33812b27
commit 755d69675f

View File

@@ -148,14 +148,24 @@ struct
else handleTrianglePressed (xAxis, yAxis) else handleTrianglePressed (xAxis, yAxis)
val () = val () =
if r1Pressed = 0 then #r1Pressed state := false if r1Pressed = 0 then
else if !(#r1Pressed state) then () #r1Pressed state := false
else InputMailbox.append (CHAR_EVENT #" ") else if !(#r1Pressed state) then
()
else
let val () = InputMailbox.append (CHAR_EVENT #" ")
in #r1Pressed state := true
end
val () = val () =
if l1Pressed = 0 then #l1Pressed state := false if l1Pressed = 0 then
else if !(#l1Pressed state) then () #l1Pressed state := false
else InputMailbox.append KEY_BACKSPACE else if !(#l1Pressed state) then
()
else
let val () = InputMailbox.append KEY_BACKSPACE
in #l1Pressed state := false
end
in in
() ()
end end