mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
parent
4629306f4b
commit
89598df520
@ -392,6 +392,7 @@ import "C"
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
//export ebitenAddGamepad
|
//export ebitenAddGamepad
|
||||||
@ -409,7 +410,7 @@ func (g *gamepads) addIOSGamepad(controller C.uintptr_t, prop *C.struct_Controll
|
|||||||
defer g.m.Unlock()
|
defer g.m.Unlock()
|
||||||
|
|
||||||
name := C.GoString(&prop.name[0])
|
name := C.GoString(&prop.name[0])
|
||||||
sdlID := hex.EncodeToString([]byte(C.GoStringN(&prop.guid[0], 16)))
|
sdlID := hex.EncodeToString(C.GoBytes(unsafe.Pointer(&prop.guid[0]), 16))
|
||||||
gp := g.add(name, sdlID)
|
gp := g.add(name, sdlID)
|
||||||
gp.native = &nativeGamepadImpl{
|
gp.native = &nativeGamepadImpl{
|
||||||
controller: uintptr(controller),
|
controller: uintptr(controller),
|
||||||
|
Loading…
Reference in New Issue
Block a user