Beispiel #1
0
func (win *Window) GetDisplayMode() (*DisplayMode, error) {
	var dm DisplayMode
	if C.SDL_GetWindowDisplayMode(win.c, dm.c()) != 0 {
		return nil, getError()
	}

	return &dm, nil
}
Beispiel #2
0
func (window *Window) GetDisplayMode(mode *DisplayMode) int {
	_window := (*C.SDL_Window)(unsafe.Pointer(window))
	_mode := (*C.SDL_DisplayMode)(unsafe.Pointer(mode))
	return (int)(C.SDL_GetWindowDisplayMode(_window, _mode))
}
Beispiel #3
0
// Window (https://wiki.libsdl.org/SDL_GetWindowDisplayMode)
func (window *Window) GetDisplayMode(mode *DisplayMode) error {
	if C.SDL_GetWindowDisplayMode(window.cptr(), mode.cptr()) != 0 {
		return GetError()
	}
	return nil
}
Beispiel #4
0
func (window *Window) GetDisplayMode(mode *DisplayMode) int {
	return int(C.SDL_GetWindowDisplayMode(window.cptr(), mode.cptr()))
}