mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
egl: Reject attempts to set negative swap intervals
This commit is contained in:
parent
c54c16d353
commit
9161f95166
@ -1087,6 +1087,13 @@ SDL_EGL_SetSwapInterval(_THIS, int interval)
|
|||||||
if (!_this->egl_data) {
|
if (!_this->egl_data) {
|
||||||
return SDL_SetError("EGL not initialized");
|
return SDL_SetError("EGL not initialized");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* FIXME: Revisit this check when EGL_EXT_swap_control_tear is published:
|
||||||
|
* https://github.com/KhronosGroup/EGL-Registry/pull/113
|
||||||
|
*/
|
||||||
|
if (interval < 0) {
|
||||||
|
return SDL_SetError("Late swap tearing currently unsupported");
|
||||||
|
}
|
||||||
|
|
||||||
status = _this->egl_data->eglSwapInterval(_this->egl_data->egl_display, interval);
|
status = _this->egl_data->eglSwapInterval(_this->egl_data->egl_display, interval);
|
||||||
if (status == EGL_TRUE) {
|
if (status == EGL_TRUE) {
|
||||||
|
Loading…
Reference in New Issue
Block a user