mirror of https://github.com/encounter/SDL.git
cocoa: Fix OpenGL deprecation warning.
This commit is contained in:
parent
7c760f7f79
commit
7ebdae5dc9
|
@ -260,12 +260,6 @@ static void ConvertNSRect(NSScreen *screen, BOOL fullscreen, NSRect *r)
|
|||
static void
|
||||
ScheduleContextUpdates(SDL_WindowData *data)
|
||||
{
|
||||
NSOpenGLContext *currentContext;
|
||||
NSMutableArray *contexts;
|
||||
if (!data || !data.nscontexts) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* We still support OpenGL as long as Apple offers it, deprecated or not, so disable deprecation warnings about it. */
|
||||
#if SDL_VIDEO_OPENGL
|
||||
|
||||
|
@ -274,6 +268,12 @@ ScheduleContextUpdates(SDL_WindowData *data)
|
|||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
|
||||
NSOpenGLContext *currentContext;
|
||||
NSMutableArray *contexts;
|
||||
if (!data || !data.nscontexts) {
|
||||
return;
|
||||
}
|
||||
|
||||
currentContext = [NSOpenGLContext currentContext];
|
||||
contexts = data.nscontexts;
|
||||
@synchronized (contexts) {
|
||||
|
|
Loading…
Reference in New Issue