Exemplo n.º 1
0
// SetHintWithPriority (https://wiki.libsdl.org/SDL_SetHintWithPriority)
func SetHintWithPriority(name, value string, hp HintPriority) bool {
	_name := C.CString(name)
	_value := C.CString(value)
	defer C.free(unsafe.Pointer(_name))
	defer C.free(unsafe.Pointer(_value))
	return C.SDL_SetHintWithPriority(_name, _value, hp.c()) > 0
}
Exemplo n.º 2
0
func SetHintWithPriority(name string, value string,
	priority HintPriority) bool {
	_name := C.CString(name)
	_value := C.CString(value)
	_p := (C.SDL_HintPriority)(priority)
	defer C.free(unsafe.Pointer(_name))
	defer C.free(unsafe.Pointer(_value))
	return C.SDL_SetHintWithPriority(_name, _value, _p) > 0
}
Exemplo n.º 3
0
func SetHintWithPriority(name string, value string, priority int) bool {
	cname := C.CString(name)
	cvalue := C.CString(value)

	ret := C.SDL_SetHintWithPriority(cname, cvalue, C.SDL_HintPriority(priority))

	C.free(unsafe.Pointer(cname))
	C.free(unsafe.Pointer(cvalue))

	return ret == C.SDL_TRUE
}