mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
parent
4629306f4b
commit
89598df520
@ -392,6 +392,7 @@ import "C"
|
||||
|
||||
import (
|
||||
"encoding/hex"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
//export ebitenAddGamepad
|
||||
@ -409,7 +410,7 @@ func (g *gamepads) addIOSGamepad(controller C.uintptr_t, prop *C.struct_Controll
|
||||
defer g.m.Unlock()
|
||||
|
||||
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.native = &nativeGamepadImpl{
|
||||
controller: uintptr(controller),
|
||||
|
Loading…
Reference in New Issue
Block a user