func GetError() error { _err := C.SDL_GetError() if *_err == 0 { return nil } return errors.New(C.GoString(_err)) }
func GetError() error { ret := C.SDL_GetError() if ret == nil { return nil } return errors.New(C.GoString(ret)) }
func GetError() error { _c_err := C.SDL_GetError() if _c_err == nil { return nil } return errors.New(C.GoString(_c_err)) }
func Init() (error string) { flags := int64(C.SDL_INIT_VIDEO) if C.SDL_Init(C.Uint32(flags)) != 0 { error = C.GoString(C.SDL_GetError()) return } return "" }
func getError() error { err := C.GoString(C.SDL_GetError()) if len(err) == 0 { panic("Blank error.") } return errors.New(err) }
func printerr(text string) error { _, file, line, _ := runtime.Caller(1) _, upperfile, upperline, _ := runtime.Caller(2) err := C.GoString(C.SDL_GetError()) errtxt := err if len(err) > 0 { fmt.Println("SDL error: in ", file, " line ", line, " after ", upperfile, " line ", upperline, err, text) } glerr := C.glGetError() errtxt += map[int]string{0x0500: "GL_INVALID_ENUM", 0x0501: "GL_INVALID_VALUE", 0x0502: "GL_INVALID_OPERATION", 0x0505: "GL_OUT_OF_MEMORY"}[int(glerr)] if glerr != C.GL_NO_ERROR { fmt.Println("GL error: in ", file, " line ", line, " after ", upperfile, " line ", upperline, glerr, "("+map[int]string{0x0500: "GL_INVALID_ENUM", 0x0501: "GL_INVALID_VALUE", 0x0502: "GL_INVALID_OPERATION", 0x0505: "GL_OUT_OF_MEMORY"}[int(glerr)]+")", text) } if len(errtxt) > 0 { return errors.New(errtxt) } return nil }
func GetError() (ret string) { ret = C.GoString(C.SDL_GetError()) C.SDL_ClearError() return }
// GetError (https://wiki.libsdl.org/SDL_GetError) func GetError() error { if err := C.SDL_GetError(); err != nil { return errors.New(C.GoString(err)) } return nil }
// Gets SDL error string func GetError() string { return C.GoString(C.SDL_GetError()) }
func GL_SetAttribute(attribute GLattr, value int) (err error) { if C.SDL_GL_SetAttribute(C.SDL_GLattr(attribute), C.int(value)) != 0 { return errors.New(C.GoString(C.SDL_GetError())) } return nil }
func fatalSDLError() { log.Fatal(C.GoString(C.SDL_GetError())) }
func sdlError() error { return errors.New(C.GoString(C.SDL_GetError())) }
// getError returns a message about the last error that occurred. func getError() (err error) { return errors.New(C.GoString(C.SDL_GetError())) }
func Init(flags uint32) (err error) { if C.SDL_Init(C.Uint32(flags)) != 0 { return errors.New(C.GoString(C.SDL_GetError())) } return nil }
// Gets the current error message of SDL func GetError() string { res := C.SDL_GetError() return C.GoString(res) }
// Gets SDL error string func GetError() string { GlobalMutex.Lock() s := C.GoString(C.SDL_GetError()) GlobalMutex.Unlock() return s }
// Gets SDL error string func GetError() string { s := C.GoString(C.SDL_GetError()) return s }