mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2025-04-16 21:46:03 +02:00
Fix disabling OpenGL vsync on macOS 10.14.4+ (bug #4575).
This commit is contained in:
parent
aae49015da
commit
00c824a8b0
@ -208,6 +208,7 @@ Cocoa_GL_CreateContext(_THIS, SDL_Window * window)
|
|||||||
const char *glversion;
|
const char *glversion;
|
||||||
int glversion_major;
|
int glversion_major;
|
||||||
int glversion_minor;
|
int glversion_minor;
|
||||||
|
int interval;
|
||||||
|
|
||||||
if (_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES) {
|
if (_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES) {
|
||||||
#if SDL_VIDEO_OPENGL_EGL
|
#if SDL_VIDEO_OPENGL_EGL
|
||||||
@ -319,6 +320,10 @@ Cocoa_GL_CreateContext(_THIS, SDL_Window * window)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* vsync is handled separately by synchronizing with a display link. */
|
||||||
|
interval = 0;
|
||||||
|
[context setValues:&interval forParameter:NSOpenGLContextParameterSwapInterval];
|
||||||
|
|
||||||
if ( Cocoa_GL_MakeCurrent(_this, window, context) < 0 ) {
|
if ( Cocoa_GL_MakeCurrent(_this, window, context) < 0 ) {
|
||||||
Cocoa_GL_DeleteContext(_this, context);
|
Cocoa_GL_DeleteContext(_this, context);
|
||||||
SDL_SetError("Failed making OpenGL context current");
|
SDL_SetError("Failed making OpenGL context current");
|
||||||
|
Loading…
Reference in New Issue
Block a user