Moved some cleanup stuff to QZ_VideoQuit() from QZ_UnsetVideoMode()...fixes
authorRyan C. Gordon <icculus@icculus.org>
Fri, 13 Dec 2002 21:09:52 +0000
changeset 56037c31c12eb70
parent 559 b528214c8c9a
child 561 4bcf7dd06c47
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
     1.1 --- a/src/video/quartz/SDL_QuartzVideo.m	Wed Dec 11 05:52:28 2002 +0000
     1.2 +++ b/src/video/quartz/SDL_QuartzVideo.m	Fri Dec 13 21:09:52 2002 +0000
     1.3 @@ -397,13 +397,6 @@
     1.4              QZ_TearDownOpenGL (this);
     1.5      }
     1.6  
     1.7 -    /* Restore gamma settings */
     1.8 -    CGDisplayRestoreColorSyncSettings ();
     1.9 -
    1.10 -    /* Ensure the cursor will be visible and working when we quit */
    1.11 -    CGDisplayShowCursor (display_id);
    1.12 -    CGAssociateMouseAndMouseCursorPosition (1);
    1.13 -
    1.14      /* Signal successful teardown */
    1.15      video_set = SDL_FALSE;
    1.16  }
    1.17 @@ -576,7 +569,7 @@
    1.18              return NULL;
    1.19          }
    1.20      
    1.21 -        [ qz_window setReleasedWhenClosed:YES ];
    1.22 +        //[ qz_window setReleasedWhenClosed:YES ];
    1.23          QZ_SetCaption(this, this->wm_title, this->wm_icon);
    1.24          [ qz_window setAcceptsMouseMovedEvents:YES ];
    1.25          [ qz_window setViewsNeedDisplay:NO ];
    1.26 @@ -1061,6 +1054,13 @@
    1.27  
    1.28  static void QZ_VideoQuit (_THIS) {
    1.29  
    1.30 +    /* Restore gamma settings */
    1.31 +    CGDisplayRestoreColorSyncSettings ();
    1.32 +
    1.33 +    /* Ensure the cursor will be visible and working when we quit */
    1.34 +    CGDisplayShowCursor (display_id);
    1.35 +    CGAssociateMouseAndMouseCursorPosition (1);
    1.36 +    
    1.37      QZ_UnsetVideoMode (this);
    1.38      CGPaletteRelease (palette);
    1.39  }