From 177e46f1580d67fc124b01fc39a1099fc004d743 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 15 Sep 2011 20:59:57 -0400 Subject: [PATCH] Fixed Quartz UpdateRects failing to draw after a second SDL_SetVideoMode(). --HG-- branch : SDL-1.2 --- src/video/quartz/SDL_QuartzVideo.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/video/quartz/SDL_QuartzVideo.m b/src/video/quartz/SDL_QuartzVideo.m index b859d04f8..6669ca0ac 100644 --- a/src/video/quartz/SDL_QuartzVideo.m +++ b/src/video/quartz/SDL_QuartzVideo.m @@ -1097,6 +1097,12 @@ static SDL_Surface* QZ_SetVideoMode (_THIS, SDL_Surface *current, int width, return NULL; } + if (qz_window != nil) { + NSGraphicsContext *ctx; + ctx = [NSGraphicsContext graphicsContextWithWindow:qz_window]; + [NSGraphicsContext setCurrentContext:ctx]; + } + /* Setup the new pixel format */ { int amask = 0,