Ejemplo n.º 1
0
func GetVideoInfo() *VideoInfo {
	vinfo := (*internalVideoInfo)(cast(C.SDL_GetVideoInfo()))

	flags := vinfo.Flags

	return &VideoInfo{
		HW_available: flags&(1<<0) != 0,
		WM_available: flags&(1<<1) != 0,
		Blit_hw:      flags&(1<<9) != 0,
		Blit_hw_CC:   flags&(1<<10) != 0,
		Blit_hw_A:    flags&(1<<11) != 0,
		Blit_sw:      flags&(1<<12) != 0,
		Blit_sw_CC:   flags&(1<<13) != 0,
		Blit_sw_A:    flags&(1<<14) != 0,
		Blit_fill:    flags&(1<<15) != 0,
		Video_mem:    vinfo.Video_mem,
		Vfmt:         vinfo.Vfmt,
		Current_w:    vinfo.Current_w,
		Current_h:    vinfo.Current_h,
	}
}
Ejemplo n.º 2
0
func GetVideoInfo() VideoInfo {
	ptr := C.SDL_GetVideoInfo()
	return VideoInfo{unsafe.Pointer(ptr)}
}
Ejemplo n.º 3
0
// This function returns a read-only pointer to information about the
// video hardware.  If this is called before SetVideoMode(), the 'vfmt'
// member of the returned structure will contain the pixel format of the
// "best" video mode.
func getVideoInfo() *C.SDL_VideoInfo {
	return C.SDL_GetVideoInfo()
}