Beispiel #1
0
// LogMessage (https://wiki.libsdl.org/SDL_LogMessage)
func LogMessage(cat int, pri LogPriority, str string, args ...interface{}) {
	str = fmt.Sprintf(str, args...)

	cstr := C.CString(str)
	defer C.free(unsafe.Pointer(cstr))

	C._SDL_LogMessage(C.int(cat), C.SDL_LogPriority(pri), cstr)
}
Beispiel #2
0
func (p LogPriority) c() C.SDL_LogPriority {
	return C.SDL_LogPriority(p)
}
Beispiel #3
0
func LogSetPriority(cat int, p LogPriority) {
	C.SDL_LogSetPriority(C.int(cat), C.SDL_LogPriority(p))
}
Beispiel #4
0
func LogSetAllPriority(p LogPriority) {
	C.SDL_LogSetAllPriority(C.SDL_LogPriority(p))
}