示例#1
0
文件: video.go 项目: badgerodon/go
func VideoModeOK(width, height, bitsPerPixel int, flags SurfaceFlags) int {
	c_width := C.int(width)
	c_height := C.int(height)
	c_bpp := C.int(bitsPerPixel)
	c_flags := C.Uint32(flags)
	ret := C.SDL_VideoModeOK(c_width, c_height, c_bpp, c_flags)
	return int(ret)
}
示例#2
0
文件: sdl.go 项目: kearsley/Go-SDL
// Checks to see if a particular video mode is supported.  Returns 0 if not
// supported, or the bits-per-pixel of the closest available mode.
func VideoModeOK(width int, height int, bpp int, flags uint32) int {
	GlobalMutex.Lock()
	status := int(C.SDL_VideoModeOK(C.int(width), C.int(height), C.int(bpp), C.Uint32(flags)))
	GlobalMutex.Unlock()
	return status
}
示例#3
0
文件: sdl.go 项目: gnanderson/Go-SDL
// Checks to see if a particular video mode is supported.  Returns 0 if not
// supported, or the bits-per-pixel of the closest available mode.
func VideoModeOK(width int, height int, bpp int, flags uint32) int {
	return int(C.SDL_VideoModeOK(C.int(width), C.int(height), C.int(bpp), C.Uint32(flags)))
}
示例#4
0
文件: video.go 项目: beoran/fungo
// Check to see if a particular video mode is supported.
// It returns 0 if the requested mode is not supported under any bit depth,
// or returns the bits-per-pixel of the closest available mode with the
// given width and height.  If this bits-per-pixel is different from the
// one used when setting the video mode, SetVideoMode() will succeed,
// but will emulate the requested bits-per-pixel with a shadow surface.
//
// The arguments to SDL_VideoModeOK() are the same ones you would pass to
// SDL_SetVideoMode()
func VideoModeOK(width, height, bpp int, flags uint32) bool {
	return i2b(int(C.SDL_VideoModeOK(C.int(width), C.int(height),
		C.int(bpp), C.Uint32(flags))))
}