func GetClosestDisplayMode(displayIndex int, mode *DisplayMode, closest *DisplayMode) *DisplayMode { _displayIndex := (C.int)(displayIndex) _mode := (*C.SDL_DisplayMode)(unsafe.Pointer(mode)) _closest := (*C.SDL_DisplayMode)(unsafe.Pointer(closest)) return (*DisplayMode)(unsafe.Pointer((C.SDL_GetClosestDisplayMode(_displayIndex, _mode, _closest)))) }
// GetClosestDisplayMode (https://wiki.libsdl.org/SDL_GetClosestDisplayMode) func GetClosestDisplayMode(displayIndex int, mode *DisplayMode, closest *DisplayMode) (*DisplayMode, error) { m := (*DisplayMode)(unsafe.Pointer((C.SDL_GetClosestDisplayMode(C.int(displayIndex), mode.cptr(), closest.cptr())))) if m == nil { return nil, GetError() } return m, nil }
func GetClosestDisplayMode(i int, m *DisplayMode) (*DisplayMode, error) { var dm DisplayMode if C.SDL_GetClosestDisplayMode(C.int(i), m.c(), dm.c()) == nil { return nil, errors.New("Couldn't find close match") } return &dm, nil }
func GetClosestDisplayMode(displayIndex int, mode *DisplayMode, closest *DisplayMode) *DisplayMode { return (*DisplayMode)(unsafe.Pointer((C.SDL_GetClosestDisplayMode(C.int(displayIndex), mode.cptr(), closest.cptr())))) }