Currently, sdl2:gl-get-swap-interval throws up if the underlying function returns -1, due to use of check-rc macro. -1 is a legitimate return value for this function, and it happens to be what's returned on one of the platforms I'm developing on.
I currently use the following hotfix in my projects:
(defmacro check-not-below (form lower-limit)
(with-gensyms (rc)
`(let ((,rc ,form))
(when (< ,rc ,lower-limit)
(error 'sdl2::sdl-rc-error :rc ,rc :string (sdl2-ffi.functions:sdl-get-error)))
,rc)))
;; SDL_GL_GetSwapInterval() can return -1 as a valid value; currently, CL-SDL restricts
;; the return value to >= 0, which is incorrect.
(defun sdl2:gl-get-swap-interval ()
(check-not-below (sdl2-ffi.functions:sdl-gl-get-swap-interval) -1))
Currently,
sdl2:gl-get-swap-interval
throws up if the underlying function returns -1, due to use ofcheck-rc
macro. -1 is a legitimate return value for this function, and it happens to be what's returned on one of the platforms I'm developing on.I currently use the following hotfix in my projects: