示例#1
0
文件: video.go 项目: DeedleFake/sdl
func GetDesktopDisplayMode(i int) (*DisplayMode, error) {
	var dm DisplayMode
	if C.SDL_GetDesktopDisplayMode(C.int(i), dm.c()) != 0 {
		return nil, getError()
	}

	return &dm, nil
}
示例#2
0
func GetDesktopDisplayMode(displayIndex int, mode *DisplayMode) int {
	_displayIndex := (C.int)(displayIndex)
	_mode := (*C.SDL_DisplayMode)(unsafe.Pointer(mode))
	return (int)(C.SDL_GetDesktopDisplayMode(_displayIndex, _mode))
}
示例#3
0
文件: video.go 项目: flazz/go-sdl2
// GetDesktopDisplayMode (https://wiki.libsdl.org/SDL_GetDesktopDisplayMode)
func GetDesktopDisplayMode(displayIndex int, mode *DisplayMode) error {
	if C.SDL_GetDesktopDisplayMode(C.int(displayIndex), mode.cptr()) != 0 {
		return GetError()
	}
	return nil
}
示例#4
0
文件: video.go 项目: JalfResi/go-sdl2
func GetDesktopDisplayMode(displayIndex int, mode *DisplayMode) int {
	return int(C.SDL_GetDesktopDisplayMode(C.int(displayIndex), mode.cptr()))
}