mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/cbackend: bug fix: compile error again
This commit is contained in:
parent
0eecab8278
commit
887a3ff749
@ -66,8 +66,6 @@ import (
|
||||
"reflect"
|
||||
"time"
|
||||
"unsafe"
|
||||
|
||||
"github.com/hajimehoshi/ebiten/v2/internal/ui"
|
||||
)
|
||||
|
||||
type Gamepad struct {
|
||||
@ -81,7 +79,7 @@ type Gamepad struct {
|
||||
}
|
||||
|
||||
type Touch struct {
|
||||
ID ui.TouchID
|
||||
ID int
|
||||
X int
|
||||
Y int
|
||||
}
|
||||
@ -153,7 +151,7 @@ func AppendTouches(touches []Touch) []Touch {
|
||||
|
||||
for _, t := range cTouches {
|
||||
touches = append(touches, Touch{
|
||||
ID: ui.TouchID(t.id),
|
||||
ID: int(t.id),
|
||||
X: int(t.x),
|
||||
Y: int(t.y),
|
||||
})
|
||||
|
@ -57,7 +57,7 @@ func (i *Input) AppendTouchIDs(touchIDs []TouchID) []TouchID {
|
||||
defer i.m.Unlock()
|
||||
|
||||
for _, t := range i.touches {
|
||||
touchIDs = append(touchIDs, t.ID)
|
||||
touchIDs = append(touchIDs, TouchID(t.ID))
|
||||
}
|
||||
return touchIDs
|
||||
}
|
||||
@ -79,7 +79,7 @@ func (i *Input) TouchPosition(id TouchID) (x, y int) {
|
||||
defer i.m.Unlock()
|
||||
|
||||
for _, t := range i.touches {
|
||||
if t.ID == id {
|
||||
if TouchID(t.ID) == id {
|
||||
return t.X, t.Y
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user