From bd20fb31517ddb5733ff0fc7312267c3ea604902 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Fri, 13 Dec 2002 21:09:52 +0000 Subject: [PATCH] Moved some cleanup stuff to QZ_VideoQuit() from QZ_UnsetVideoMode()...fixes cursor hiding, etc when calling SDL_SetVideoMode() multiple times. Fixed by Darrell Walisser. --- src/video/quartz/SDL_QuartzVideo.m | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/video/quartz/SDL_QuartzVideo.m b/src/video/quartz/SDL_QuartzVideo.m index ab5fc9840..8480bab35 100644 --- a/src/video/quartz/SDL_QuartzVideo.m +++ b/src/video/quartz/SDL_QuartzVideo.m @@ -397,13 +397,6 @@ static void QZ_UnsetVideoMode (_THIS) { QZ_TearDownOpenGL (this); } - /* Restore gamma settings */ - CGDisplayRestoreColorSyncSettings (); - - /* Ensure the cursor will be visible and working when we quit */ - CGDisplayShowCursor (display_id); - CGAssociateMouseAndMouseCursorPosition (1); - /* Signal successful teardown */ video_set = SDL_FALSE; } @@ -576,7 +569,7 @@ static void QZ_UnsetVideoMode (_THIS) { return NULL; } - [ qz_window setReleasedWhenClosed:YES ]; + //[ qz_window setReleasedWhenClosed:YES ]; QZ_SetCaption(this, this->wm_title, this->wm_icon); [ qz_window setAcceptsMouseMovedEvents:YES ]; [ qz_window setViewsNeedDisplay:NO ]; @@ -1061,6 +1054,13 @@ static void QZ_UpdateRects (_THIS, int numRects, SDL_Rect *rects) { static void QZ_VideoQuit (_THIS) { + /* Restore gamma settings */ + CGDisplayRestoreColorSyncSettings (); + + /* Ensure the cursor will be visible and working when we quit */ + CGDisplayShowCursor (display_id); + CGAssociateMouseAndMouseCursorPosition (1); + QZ_UnsetVideoMode (this); CGPaletteRelease (palette); }