示例#1
0
文件: video.go 项目: salihdb/sdl
// Display returns the display index associated with the window.
func (win *Window) Display() (displayIndex int, err error) {
	displayIndex = int(C.SDL_GetWindowDisplay(win.cWin))
	if displayIndex < 0 {
		return 0, getError()
	}
	return displayIndex, nil
}
示例#2
0
文件: video.go 项目: willemvds/sdl
func (win *Window) GetDisplay() (int, error) {
	if d := C.SDL_GetWindowDisplay(win.c); d >= 0 {
		return int(d), nil
	}

	return 0, getError()
}