示例#1
0
文件: hints.go 项目: DeedleFake/sdl
func GetHint(name string) string {
	cname := C.CString(name)
	defer C.free(unsafe.Pointer(cname))

	cvalue := C.SDL_GetHint(cname)
	if cvalue == nil {
		return ""
	}
	return C.GoString(cvalue)
}
示例#2
0
func GetHint(name string) string {
	cname := C.CString(name)

	cvalue := C.SDL_GetHint(cname)

	value := C.GoString(cvalue)

	C.free(unsafe.Pointer(cname))

	return value
}
示例#3
0
文件: hints.go 项目: emlai/go-sdl2
// GetHint (https://wiki.libsdl.org/SDL_GetHint)
func GetHint(name string) string {
	_name := C.CString(name)
	defer C.free(unsafe.Pointer(_name))
	return C.GoString(C.SDL_GetHint(_name))
}