mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 11:48:55 +01:00
ebiten: Refactoring: Stop using TouchIDs in TouchPosition
This commit is contained in:
parent
853c1f2b92
commit
26bb1b5f31
11
input.go
11
input.go
@ -207,16 +207,5 @@ func TouchIDs() []TouchID {
|
|||||||
//
|
//
|
||||||
// TouchPosition is cuncurrent-safe.
|
// TouchPosition is cuncurrent-safe.
|
||||||
func TouchPosition(id TouchID) (int, int) {
|
func TouchPosition(id TouchID) (int, int) {
|
||||||
found := false
|
|
||||||
for _, i := range uiDriver().Input().TouchIDs() {
|
|
||||||
if id == i {
|
|
||||||
found = true
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if !found {
|
|
||||||
return 0, 0
|
|
||||||
}
|
|
||||||
|
|
||||||
return uiDriver().Input().TouchPosition(id)
|
return uiDriver().Input().TouchPosition(id)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user