示例#1
0
func (ctx *RWops) RWclose() int {
	if ctx == nil {
		return 0
	}
	_ctx := (*C.SDL_RWops)(unsafe.Pointer(ctx))
	return (int)(C.RWclose(_ctx))
}
示例#2
0
文件: sdl.go 项目: gnanderson/Go-SDL
func (rw *RWops) Close() error {
	if int(C.RWclose((*C.SDL_RWops)(rw))) != 0 {
		return errors.New(GetError())
	}

	return nil
}
示例#3
0
文件: rwops.go 项目: JalfResi/go-sdl2
func (ctx *RWops) RWclose() int {
	if ctx == nil {
		return 0
	}
	return int(C.RWclose(ctx.cptr()))
}
示例#4
0
文件: rwops.go 项目: emlai/go-sdl2
// RWclose (https://wiki.libsdl.org/SDL_RWclose)
func (ctx *RWops) RWclose() error {
	if ctx != nil && C.RWclose(ctx.cptr()) != 0 {
		return GetError()
	}
	return nil
}