Esempio n. 1
0
File: video.go Progetto: 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
}
Esempio n. 2
0
func (win *Window) GetDisplay() (int, error) {
	if d := C.SDL_GetWindowDisplay(win.c); d >= 0 {
		return int(d), nil
	}

	return 0, getError()
}