Skip to content

Commit

Permalink
fix: ios input crash
Browse files Browse the repository at this point in the history
  • Loading branch information
yowpark committed Nov 13, 2023
1 parent bf25b54 commit 657a8d7
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ actor TouchControlPlayer: IControlPlayer {
}

let endPosition = try Transform.controlSpaceToScreenSpace(controlSpacePosition: up.control.position, screenSize: screenSize)
let gapTime = Date().unixTimeMilliseconds - down.control.timeStamp
if 3000 < gapTime {
return
}

if down.control.timeStamp > up.control.timeStamp {
return
}
var duration = up.control.timeStamp - down.control.timeStamp
if duration < 100 {
duration = 0
Expand Down

0 comments on commit 657a8d7

Please sign in to comment.