Skip to content

Commit

Permalink
Moved some cleanup stuff to QZ_VideoQuit() from QZ_UnsetVideoMode()..…
Browse files Browse the repository at this point in the history
….fixes

 cursor hiding, etc when calling SDL_SetVideoMode() multiple times. Fixed by
 Darrell Walisser.
  • Loading branch information
icculus committed Dec 13, 2002
1 parent b408135 commit bd20fb3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/video/quartz/SDL_QuartzVideo.m
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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 ];
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit bd20fb3

Please sign in to comment.