mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-04 19:55:19 +00:00
egl: Default to a swap interval of 0.
This matches other platforms. Also make sure Android explicitly sets vsync on restore, regardless of the specific setting, to make sure it's consistent. Fixes #14642.
This commit is contained in:
parent
deb85d1fa8
commit
db84b948f9
2 changed files with 3 additions and 4 deletions
|
|
@ -1144,6 +1144,8 @@ SDL_GLContext SDL_EGL_CreateContext(SDL_VideoDevice *_this, EGLSurface egl_surfa
|
|||
}
|
||||
}
|
||||
|
||||
SDL_GL_SetSwapInterval(0); // EGL tends to default to vsync=1. To make this consistent with the rest of SDL, we force it off at startup. Apps can explicitly enable it afterwards.
|
||||
|
||||
return (SDL_GLContext)egl_context;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,10 +50,7 @@ static void android_egl_context_restore(SDL_Window *window)
|
|||
}
|
||||
data->backup_done = false;
|
||||
|
||||
if (data->has_swap_interval) {
|
||||
SDL_GL_SetSwapInterval(data->swap_interval);
|
||||
}
|
||||
|
||||
SDL_GL_SetSwapInterval(data->swap_interval);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue