Commit 9489d57f authored by Sam Lantinga's avatar Sam Lantinga

Fixed window update problems on MacOS X 10.2 (thanks Darrell!)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40499
parent b191a1af
......@@ -227,6 +227,8 @@ static int QZ_ToggleFullScreen (_THIS, int on);
static int QZ_SetColors (_THIS, int first_color,
int num_colors, SDL_Color *colors);
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_VideoQuit (_THIS);
......
......@@ -576,9 +576,11 @@ static SDL_Surface* QZ_SetVideoWindowed (_THIS, SDL_Surface *current, int width,
LockPortBits ( [ window_view qdPort ] );
current->pixels = GetPixBaseAddr ( GetPortPixMap ( [ window_view qdPort ] ) );
current->pitch = GetPixRowBytes ( GetPortPixMap ( [ window_view qdPort ] ) );
UnlockPortBits ( [ window_view qdPort ] );
current->flags |= SDL_SWSURFACE;
current->flags |= SDL_PREALLOC;
current->flags |= SDL_ASYNCBLIT;
if ( 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->LockHWSurface = QZ_LockWindow;
this->UnlockHWSurface = QZ_UnlockWindow;
}
/* Save flags to ensure correct teardown */
......@@ -913,6 +917,17 @@ static int QZ_IsWindowObscured (NSWindow *window) {
#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) {
if (SDL_VideoSurface->flags & SDL_OPENGLBLIT) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment