Example #1
0
func GetScancodeFromName(name string) Scancode {
	_name := (C.CString)(name)
	return (Scancode)(C.SDL_GetScancodeFromName(_name))
}
Example #2
0
func GetScancodeFromName(name string) int32 {
	cname := C.CString(name)
	scancode := C.SDL_GetScancodeFromName(cname)
	C.free(unsafe.Pointer(cname))
	return int32(scancode)
}
Example #3
0
func GetScancodeFromName(name string) Scancode {
	cname := C.CString(name)
	defer C.free(unsafe.Pointer(cname))

	return Scancode(C.SDL_GetScancodeFromName(cname))
}