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