Fixed window update problems on MacOS X 10.2 (thanks Darrell!)
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40499
This commit is contained in:
parent
b191a1af95
commit
9489d57f28
2 changed files with 20 additions and 3 deletions
|
@ -227,6 +227,8 @@ static int QZ_ToggleFullScreen (_THIS, int on);
|
||||||
static int QZ_SetColors (_THIS, int first_color,
|
static int QZ_SetColors (_THIS, int first_color,
|
||||||
int num_colors, SDL_Color *colors);
|
int num_colors, SDL_Color *colors);
|
||||||
static void QZ_DirectUpdate (_THIS, int num_rects, SDL_Rect *rects);
|
static void QZ_DirectUpdate (_THIS, int num_rects, SDL_Rect *rects);
|
||||||
|
static int QZ_LockWindow (_THIS, SDL_Surface *surface);
|
||||||
|
static void QZ_UnlockWindow (_THIS, SDL_Surface *surface);
|
||||||
static void QZ_UpdateRects (_THIS, int num_rects, SDL_Rect *rects);
|
static void QZ_UpdateRects (_THIS, int num_rects, SDL_Rect *rects);
|
||||||
static void QZ_VideoQuit (_THIS);
|
static void QZ_VideoQuit (_THIS);
|
||||||
|
|
||||||
|
|
|
@ -576,9 +576,11 @@ static SDL_Surface* QZ_SetVideoWindowed (_THIS, SDL_Surface *current, int width,
|
||||||
LockPortBits ( [ window_view qdPort ] );
|
LockPortBits ( [ window_view qdPort ] );
|
||||||
current->pixels = GetPixBaseAddr ( GetPortPixMap ( [ window_view qdPort ] ) );
|
current->pixels = GetPixBaseAddr ( GetPortPixMap ( [ window_view qdPort ] ) );
|
||||||
current->pitch = GetPixRowBytes ( GetPortPixMap ( [ window_view qdPort ] ) );
|
current->pitch = GetPixRowBytes ( GetPortPixMap ( [ window_view qdPort ] ) );
|
||||||
|
UnlockPortBits ( [ window_view qdPort ] );
|
||||||
|
|
||||||
current->flags |= SDL_SWSURFACE;
|
current->flags |= SDL_SWSURFACE;
|
||||||
current->flags |= SDL_PREALLOC;
|
current->flags |= SDL_PREALLOC;
|
||||||
|
current->flags |= SDL_ASYNCBLIT;
|
||||||
|
|
||||||
if ( flags & SDL_NOFRAME )
|
if ( flags & SDL_NOFRAME )
|
||||||
current->flags |= SDL_NOFRAME;
|
current->flags |= SDL_NOFRAME;
|
||||||
|
@ -591,6 +593,8 @@ static SDL_Surface* QZ_SetVideoWindowed (_THIS, SDL_Surface *current, int width,
|
||||||
}
|
}
|
||||||
|
|
||||||
this->UpdateRects = QZ_UpdateRects;
|
this->UpdateRects = QZ_UpdateRects;
|
||||||
|
this->LockHWSurface = QZ_LockWindow;
|
||||||
|
this->UnlockHWSurface = QZ_UnlockWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Save flags to ensure correct teardown */
|
/* Save flags to ensure correct teardown */
|
||||||
|
@ -913,6 +917,17 @@ static int QZ_IsWindowObscured (NSWindow *window) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Locking functions for the software window buffer */
|
||||||
|
static int QZ_LockWindow (_THIS, SDL_Surface *surface) {
|
||||||
|
|
||||||
|
return LockPortBits ( [ window_view qdPort ] );
|
||||||
|
}
|
||||||
|
|
||||||
|
static void QZ_UnlockWindow (_THIS, SDL_Surface *surface) {
|
||||||
|
|
||||||
|
UnlockPortBits ( [ window_view qdPort ] );
|
||||||
|
}
|
||||||
|
|
||||||
static void QZ_UpdateRects (_THIS, int numRects, SDL_Rect *rects) {
|
static void QZ_UpdateRects (_THIS, int numRects, SDL_Rect *rects) {
|
||||||
|
|
||||||
if (SDL_VideoSurface->flags & SDL_OPENGLBLIT) {
|
if (SDL_VideoSurface->flags & SDL_OPENGLBLIT) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue