Moved some cleanup stuff to QZ_VideoQuit() from QZ_UnsetVideoMode()...fixes
cursor hiding, etc when calling SDL_SetVideoMode() multiple times. Fixed by Darrell Walisser. --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40561
This commit is contained in:
parent
a31f0acba3
commit
e2cbed54eb
1 changed files with 8 additions and 8 deletions
|
@ -397,13 +397,6 @@ static void QZ_UnsetVideoMode (_THIS) {
|
||||||
QZ_TearDownOpenGL (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 */
|
/* Signal successful teardown */
|
||||||
video_set = SDL_FALSE;
|
video_set = SDL_FALSE;
|
||||||
}
|
}
|
||||||
|
@ -576,7 +569,7 @@ static SDL_Surface* QZ_SetVideoWindowed (_THIS, SDL_Surface *current, int width,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
[ qz_window setReleasedWhenClosed:YES ];
|
//[ qz_window setReleasedWhenClosed:YES ];
|
||||||
QZ_SetCaption(this, this->wm_title, this->wm_icon);
|
QZ_SetCaption(this, this->wm_title, this->wm_icon);
|
||||||
[ qz_window setAcceptsMouseMovedEvents:YES ];
|
[ qz_window setAcceptsMouseMovedEvents:YES ];
|
||||||
[ qz_window setViewsNeedDisplay:NO ];
|
[ qz_window setViewsNeedDisplay:NO ];
|
||||||
|
@ -1061,6 +1054,13 @@ static void QZ_UpdateRects (_THIS, int numRects, SDL_Rect *rects) {
|
||||||
|
|
||||||
static void QZ_VideoQuit (_THIS) {
|
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);
|
QZ_UnsetVideoMode (this);
|
||||||
CGPaletteRelease (palette);
|
CGPaletteRelease (palette);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue