Index: libvo/vo_quartz.c =================================================================== RCS file: /cvsroot/mplayer/main/libvo/vo_quartz.c,v retrieving revision 1.6 diff -u -r1.6 vo_quartz.c --- libvo/vo_quartz.c 5 May 2004 02:38:35 -0000 1.6 +++ libvo/vo_quartz.c 6 May 2004 08:36:17 -0000 @@ -55,17 +55,15 @@ LIBVO_EXTERN(quartz) -static uint32_t image_width; -static uint32_t image_height; static uint32_t image_depth; static uint32_t image_format; static uint32_t image_size; static uint32_t image_buffer_size; -char *image_data; +static char *image_data; #ifdef QUARTZ_ENABLE_YUV static CodecType image_qtcodec; -static PlanarPixmapInfoYUV420 *P; +static PlanarPixmapInfoYUV420 *P = NULL; static struct { ImageSequence seqId; @@ -84,21 +82,24 @@ extern int vo_ontop; extern int vo_fs; -int int_pause = 0; -float winAlpha = 1; +// are we in fs mode or not ? +static int vo_quartz_fs = 0; +static int int_pause = 0; +static float winAlpha = 1; -int device_width; -int device_height; +static int device_width; +static int device_height; -WindowRef theWindow; +static WindowRef theWindow = NULL; -GWorldPtr imgGWorld; +static GWorldPtr imgGWorld = NULL; -Rect imgRect; -Rect dstRect; -Rect winRect; +static Rect imgRect; // size of the original image (unscaled) +static Rect dstRect; // size of the displayed image (after scaling) +static Rect winRect; // size of the window containg the displayed image (include padding) +static Rect oldWinRect; // size of the window containg the displayed image (include padding) when NOT in FS mode -CGContextRef context; +static CGContextRef context; #include "../osdep/keycodes.h" extern void mplayer_put_key(int code); @@ -125,13 +126,13 @@ case IMGFMT_YV12: case IMGFMT_IYUV: case IMGFMT_I420: - vo_draw_alpha_yv12(w,h,src,srca,stride, ((char*)P) + P->componentInfoY.offset + x0 + y0 * image_width, image_width); + vo_draw_alpha_yv12(w,h,src,srca,stride, ((char*)P) + P->componentInfoY.offset + x0 + y0 * imgRect.right, imgRect.right); break; case IMGFMT_UYVY: - //vo_draw_alpha_uyvy(w,h,src,srca,stride,((char*)P) + (x0 + y0 * image_width) * 2,image_width*2); + //vo_draw_alpha_uyvy(w,h,src,srca,stride,((char*)P) + (x0 + y0 * imgRect.right) * 2,imgRect.right*2); break; case IMGFMT_YUY2: - vo_draw_alpha_yuy2(w,h,src,srca,stride,((char*)P) + (x0 + y0 * image_width) * 2,image_width*2); + vo_draw_alpha_yuy2(w,h,src,srca,stride,((char*)P) + (x0 + y0 * imgRect.right) * 2,imgRect.right*2); break; #endif } @@ -284,12 +285,37 @@ return err; } +static void quartz_CreateWindow(uint32_t d_width, uint32_t d_height, WindowAttributes windowAttrs) { + CFStringRef titleKey; + CFStringRef windowTitle; + OSStatus result; + + SetRect(&winRect, 0, 0, d_width, d_height); + SetRect(&oldWinRect, 0, 0, d_width, d_height); + SetRect(&dstRect, 0, 0, d_width, d_height); + + CreateNewWindow(kDocumentWindowClass, windowAttrs, &winRect, &theWindow); + + //Set window title + titleKey = CFSTR("MPlayer"); + windowTitle = CFCopyLocalizedString(titleKey, NULL); + result = SetWindowTitleWithCFString(theWindow, windowTitle); + CFRelease(titleKey); + CFRelease(windowTitle); + + //Install event handler + const EventTypeSpec winEvents[] = { { kEventClassWindow, kEventWindowClosed }, { kEventClassWindow, kEventWindowBoundsChanged } }; + const EventTypeSpec keyEvents[] = { { kEventClassKeyboard, kEventRawKeyDown } }; + const EventTypeSpec mouseEvents[] = { { kEventClassMouse, kEventMouseDown } }; + + InstallWindowEventHandler (theWindow, NewEventHandlerUPP (MainWindowEventHandler), GetEventTypeCount(winEvents), winEvents, theWindow, NULL); + InstallWindowEventHandler (theWindow, NewEventHandlerUPP (MainKeyboardEventHandler), GetEventTypeCount(keyEvents), keyEvents, theWindow, NULL); + InstallApplicationEventHandler (NewEventHandlerUPP (MainMouseEventHandler), GetEventTypeCount(mouseEvents), mouseEvents, 0, NULL); +} + static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format) { WindowAttributes windowAttrs; - CFStringRef titleKey; - CFStringRef windowTitle; - OSStatus result; GDHandle deviceHdl; Rect deviceRect; OSErr qterr; @@ -300,10 +326,10 @@ device_width = deviceRect.right; device_height = deviceRect.bottom; + + SetRect(&imgRect, 0, 0, width, height); //misc mplayer setup///////////////////////////////////////////////////// - image_width = width; - image_height = height; switch (image_format) { case IMGFMT_RGB32: @@ -319,9 +345,9 @@ break; #endif } - image_size = ((image_width*image_height*image_depth)+7)/8; + image_size = ((imgRect.right * imgRect.bottom * image_depth)+7)/8; - vo_fs = flags & VOFLAG_FULLSCREEN; + vo_fs = (flags & VOFLAG_FULLSCREEN) ? 1 : 0; //get movie aspect aspect_save_orig(width,height); @@ -335,37 +361,38 @@ | kWindowStandardHandlerAttribute | kWindowLiveResizeAttribute; - if (!(IMGFMT_IS_RGB(image_format))) + if (!(IMGFMT_IS_RGB(image_format))) // clean up previous movie { windowAttrs &= (~kWindowResizableAttribute); + if (EnterMoviesDone) { // restarting + qterr = CDSequenceEnd(yuv_qt_stuff.seqId); + if (qterr) { + mp_msg(MSGT_VO, MSGL_ERR, "Quartz error: CDSequenceEnd (%d)\n", qterr); + } + } } - - SetRect(&winRect, 0, 0, d_width, d_height); - SetRect(&dstRect, 0, 0, d_width, d_height); - SetRect(&imgRect, 0, 0, image_width, image_height); - - CreateNewWindow(kDocumentWindowClass, windowAttrs, &winRect, &theWindow); - - //Set window title - titleKey = CFSTR("MPlayer"); - windowTitle = CFCopyLocalizedString(titleKey, NULL); - result = SetWindowTitleWithCFString(theWindow, windowTitle); - CFRelease(titleKey); - CFRelease(windowTitle); - - //Install event handler - const EventTypeSpec winEvents[] = { { kEventClassWindow, kEventWindowClosed }, { kEventClassWindow, kEventWindowBoundsChanged } }; - const EventTypeSpec keyEvents[] = { { kEventClassKeyboard, kEventRawKeyDown } }; - const EventTypeSpec mouseEvents[] = { { kEventClassMouse, kEventMouseDown } }; - - InstallWindowEventHandler (theWindow, NewEventHandlerUPP (MainWindowEventHandler), GetEventTypeCount(winEvents), winEvents, theWindow, NULL); - InstallWindowEventHandler (theWindow, NewEventHandlerUPP (MainKeyboardEventHandler), GetEventTypeCount(keyEvents), keyEvents, theWindow, NULL); - InstallApplicationEventHandler (NewEventHandlerUPP (MainMouseEventHandler), GetEventTypeCount(mouseEvents), mouseEvents, 0, NULL); - + + if (imgGWorld != NULL) { // clean up previous movie + DisposeGWorld(imgGWorld); + imgGWorld = NULL; + } + + if (theWindow == NULL) { + quartz_CreateWindow(d_width, d_height, windowAttrs); + if (theWindow == NULL) { //oops + mp_msg(MSGT_VO, MSGL_FATAL, "Quartz error: Couldn't create window !!!!!\n"); + return -1; + } + } else if (!vo_quartz_fs) { + HideWindow(theWindow); + ChangeWindowAttributes(theWindow, ~windowAttrs, windowAttrs); + SizeWindow (theWindow, d_width, d_height, 1); + } + #ifdef QUARTZ_ENABLE_YUV if (!(IMGFMT_IS_RGB(image_format))) { - if (!EnterMoviesDone) + if (!EnterMoviesDone) // only _once_ { qterr = EnterMovies(); EnterMoviesDone = 1; @@ -377,6 +404,7 @@ if (qterr) { mp_msg(MSGT_VO, MSGL_FATAL, "Quartz error: EnterMovies (%d)\n", qterr); + return -1; } { @@ -388,13 +416,13 @@ qterr = FindCodec(image_qtcodec, bestSpeedCodec, NULL, &mycodec); if (qterr) { - mp_msg(MSGT_VO, MSGL_FATAL, "Quartz error: FindCodec (%d)\n", qterr); + mp_msg(MSGT_VO, MSGL_ERR, "Quartz error: FindCodec (%d)\n", qterr); } qterr = GetComponentInfo(mycodec, &cd2, h1, h2, NULL); if (qterr) { - mp_msg(MSGT_VO, MSGL_FATAL, "Quartz error: GetComponentInfo (%d)\n", qterr); + mp_msg(MSGT_VO, MSGL_ERR, "Quartz error: GetComponentInfo (%d)\n", qterr); } memcpy(ch1, &((unsigned char*)(*h1))[1], ((unsigned char*)(*h1))[0]); @@ -418,7 +446,7 @@ if (qterr) { - mp_msg(MSGT_VO, MSGL_FATAL, "Quartz error: GetCodecInfo (%d)\n", qterr); + mp_msg(MSGT_VO, MSGL_ERR, "Quartz error: GetCodecInfo (%d)\n", qterr); } mp_msg(MSGT_VO, MSGL_INFO, "Quartz: CodecInfo:\n\tname: %s\n\tvendor: %.4s\n\tversion/revision: %d/%d\n\tdecompressFlags: 0x%08x\n\tcompressFlags: 0x%08x\n\tformatFlags: 0x%08x\n", ch1, &ci.vendor, ci.version, ci.revisionLevel, ci.decompressFlags, ci.compressFlags, ci.formatFlags); } @@ -434,9 +462,9 @@ ((FieldInfoImageDescriptionExtension*)(*yuv_qt_stuff.extension_fiel))->fieldCount = 1; ((FieldInfoImageDescriptionExtension*)(*yuv_qt_stuff.extension_fiel))->fieldOrderings = 0; yuv_qt_stuff.extension_clap = NewHandleClear(sizeof(CleanApertureImageDescriptionExtension)); - ((CleanApertureImageDescriptionExtension*)(*yuv_qt_stuff.extension_clap))->cleanApertureWidthN = image_width; + ((CleanApertureImageDescriptionExtension*)(*yuv_qt_stuff.extension_clap))->cleanApertureWidthN = imgRect.right; ((CleanApertureImageDescriptionExtension*)(*yuv_qt_stuff.extension_clap))->cleanApertureWidthD = 1; - ((CleanApertureImageDescriptionExtension*)(*yuv_qt_stuff.extension_clap))->cleanApertureHeightN = image_height; + ((CleanApertureImageDescriptionExtension*)(*yuv_qt_stuff.extension_clap))->cleanApertureHeightN = imgRect.bottom; ((CleanApertureImageDescriptionExtension*)(*yuv_qt_stuff.extension_clap))->cleanApertureHeightD = 1; ((CleanApertureImageDescriptionExtension*)(*yuv_qt_stuff.extension_clap))->horizOffN = 0; ((CleanApertureImageDescriptionExtension*)(*yuv_qt_stuff.extension_clap))->horizOffD = 1; @@ -451,8 +479,8 @@ (*yuv_qt_stuff.desc)->version = 2; (*yuv_qt_stuff.desc)->revisionLevel = 0; (*yuv_qt_stuff.desc)->vendor = 'mpla'; - (*yuv_qt_stuff.desc)->width = image_width; - (*yuv_qt_stuff.desc)->height = image_height; + (*yuv_qt_stuff.desc)->width = imgRect.right; + (*yuv_qt_stuff.desc)->height = imgRect.bottom; (*yuv_qt_stuff.desc)->hRes = Long2Fix(72); (*yuv_qt_stuff.desc)->vRes = Long2Fix(72); (*yuv_qt_stuff.desc)->temporalQuality = 0; @@ -465,25 +493,25 @@ qterr = AddImageDescriptionExtension(yuv_qt_stuff.desc, yuv_qt_stuff.extension_colr, kColorInfoImageDescriptionExtension); if (qterr) { - mp_msg(MSGT_VO, MSGL_FATAL, "Quartz error: AddImageDescriptionExtension [colr] (%d)\n", qterr); + mp_msg(MSGT_VO, MSGL_ERR, "Quartz error: AddImageDescriptionExtension [colr] (%d)\n", qterr); } qterr = AddImageDescriptionExtension(yuv_qt_stuff.desc, yuv_qt_stuff.extension_fiel, kFieldInfoImageDescriptionExtension); if (qterr) { - mp_msg(MSGT_VO, MSGL_FATAL, "Quartz error: AddImageDescriptionExtension [fiel] (%d)\n", qterr); + mp_msg(MSGT_VO, MSGL_ERR, "Quartz error: AddImageDescriptionExtension [fiel] (%d)\n", qterr); } qterr = AddImageDescriptionExtension(yuv_qt_stuff.desc, yuv_qt_stuff.extension_clap, kCleanApertureImageDescriptionExtension); if (qterr) { - mp_msg(MSGT_VO, MSGL_FATAL, "Quartz error: AddImageDescriptionExtension [clap] (%d)\n", qterr); + mp_msg(MSGT_VO, MSGL_ERR, "Quartz error: AddImageDescriptionExtension [clap] (%d)\n", qterr); } qterr = AddImageDescriptionExtension(yuv_qt_stuff.desc, yuv_qt_stuff.extension_pasp, kCleanApertureImageDescriptionExtension); if (qterr) { - mp_msg(MSGT_VO, MSGL_FATAL, "Quartz error: AddImageDescriptionExtension [pasp] (%d)\n", qterr); + mp_msg(MSGT_VO, MSGL_ERR, "Quartz error: AddImageDescriptionExtension [pasp] (%d)\n", qterr); } SetPort(GetWindowPort(theWindow)); @@ -492,7 +520,9 @@ { ScaleMatrix(&yuv_qt_stuff.matrix, FixDiv(Long2Fix(d_width),Long2Fix(width)), FixDiv(Long2Fix(d_height),Long2Fix(height)), 0, 0); } - + if (P != NULL) { // second or subsequent movie + free(P); + } P = calloc(sizeof(PlanarPixmapInfoYUV420) + image_size, 1); switch (image_format) { @@ -502,9 +532,9 @@ P->componentInfoY.offset = sizeof(PlanarPixmapInfoYUV420); P->componentInfoCb.offset = P->componentInfoY.offset + image_size / 2; P->componentInfoCr.offset = P->componentInfoCb.offset + image_size / 4; - P->componentInfoY.rowBytes = image_width; - P->componentInfoCb.rowBytes = image_width / 2; - P->componentInfoCr.rowBytes = image_width / 2; + P->componentInfoY.rowBytes = imgRect.right; + P->componentInfoCb.rowBytes = imgRect.right / 2; + P->componentInfoCr.rowBytes = imgRect.right / 2; image_buffer_size = image_size + sizeof(PlanarPixmapInfoYUV420); break; case IMGFMT_UYVY: @@ -536,15 +566,20 @@ if (qterr) { mp_msg(MSGT_VO, MSGL_FATAL, "Quartz error: DecompressSequenceBeginS (%d)\n", qterr); + return -1; } mp_msg(MSGT_VO, MSGL_INFO, "Quartz: DecompressSequenceBeginS done\n"); } #endif /* QUARTZ_ENABLE_YUV */ //Show window + if (!vo_quartz_fs) { RepositionWindow(theWindow, NULL, kWindowCascadeOnMainScreen); ShowWindow (theWindow); - + } else { // stay in full screen + vo_fs = 1; + } + if(vo_fs) window_fullscreen(); @@ -587,7 +622,7 @@ static void draw_osd(void) { - vo_draw_text(image_width,image_height,draw_alpha); + vo_draw_text(imgRect.right,imgRect.bottom,draw_alpha); } static void flip_page(void) @@ -613,7 +648,7 @@ else canLockPixels = false; - if (canLockPixels) + if (canLockPixels && (imgGWorld != NULL)) { CopyBits( GetPortBitMapForCopyBits (imgGWorld), GetPortBitMapForCopyBits (windowPort), &imgRect, &dstRect, srcCopy, 0 ); lockPixelsError = UnlockPortBits(windowPort); @@ -663,23 +698,23 @@ switch (image_format) { case IMGFMT_YV12: case IMGFMT_I420: - memcpy_pic(((char*)P) + P->componentInfoY.offset + x + image_width * y, src[0], - w, h, image_width, stride[0]); + memcpy_pic(((char*)P) + P->componentInfoY.offset + x + imgRect.right * y, src[0], + w, h, imgRect.right, stride[0]); x=x/2;y=y/2;w=w/2;h=h/2; - memcpy_pic(((char*)P) + P->componentInfoCb.offset + x + image_width / 2 * y, src[1], - w, h, image_width / 2, stride[1]); - memcpy_pic(((char*)P) + P->componentInfoCr.offset + x + image_width / 2 * y, src[2], - w, h, image_width / 2, stride[2]); + memcpy_pic(((char*)P) + P->componentInfoCb.offset + x + imgRect.right / 2 * y, src[1], + w, h, imgRect.right / 2, stride[1]); + memcpy_pic(((char*)P) + P->componentInfoCr.offset + x + imgRect.right / 2 * y, src[2], + w, h, imgRect.right / 2, stride[2]); return 0; case IMGFMT_IYUV: - memcpy_pic(((char*)P) + P->componentInfoY.offset + x + image_width * y, src[0], - w, h, image_width, stride[0]); + memcpy_pic(((char*)P) + P->componentInfoY.offset + x + imgRect.right * y, src[0], + w, h, imgRect.right, stride[0]); x=x/2;y=y/2;w=w/2;h=h/2; - memcpy_pic(((char*)P) + P->componentInfoCr.offset + x + image_width / 2 * y, src[1], - w, h, image_width / 2, stride[1]); - memcpy_pic(((char*)P) + P->componentInfoCb.offset + x + image_width / 2 * y, src[2], - w, h, image_width / 2, stride[2]); + memcpy_pic(((char*)P) + P->componentInfoCr.offset + x + imgRect.right / 2 * y, src[1], + w, h, imgRect.right / 2, stride[1]); + memcpy_pic(((char*)P) + P->componentInfoCb.offset + x + imgRect.right / 2 * y, src[2], + w, h, imgRect.right / 2, stride[2]); return 0; } #endif @@ -691,13 +726,15 @@ switch (image_format) { case IMGFMT_RGB32: image_data = src[0]; - DisposeGWorld(imgGWorld); - NewGWorldFromPtr (&imgGWorld, k32ARGBPixelFormat, &imgRect, 0, 0, 0, image_data, image_width * 4); + if (imgGWorld) { + DisposeGWorld(imgGWorld); + } + NewGWorldFromPtr (&imgGWorld, k32ARGBPixelFormat, &imgRect, 0, 0, 0, image_data, imgRect.right * 4); return 0; #ifdef QUARTZ_ENABLE_YUV case IMGFMT_UYVY: case IMGFMT_YUY2: - memcpy_pic(((char*)P), src[0], image_width * 2, image_height, image_width * 2, image_width * 2); + memcpy_pic(((char*)P), src[0], imgRect.right * 2, imgRect.bottom, imgRect.right * 2, imgRect.right * 2); return 0; #endif } @@ -753,7 +790,7 @@ qterr = CDSequenceEnd(yuv_qt_stuff.seqId); if (qterr) { - mp_msg(MSGT_VO, MSGL_FATAL, "Quartz error: CDSequenceEnd (%d)\n", qterr); + mp_msg(MSGT_VO, MSGL_ERR, "Quartz error: CDSequenceEnd (%d)\n", qterr); } } } @@ -794,24 +831,24 @@ } mpi->planes[0]=((char*)P) + P->componentInfoY.offset; - mpi->stride[0]=image_width; - mpi->width=image_width; + mpi->stride[0]=imgRect.right; + mpi->width=imgRect.right; if(mpi->flags&MP_IMGFLAG_SWAPPED) { // I420 mpi->planes[1]=((char*)P) + P->componentInfoCb.offset; mpi->planes[2]=((char*)P) + P->componentInfoCr.offset; - mpi->stride[1]=image_width/2; - mpi->stride[2]=image_width/2; + mpi->stride[1]=imgRect.right/2; + mpi->stride[2]=imgRect.right/2; } else { // YV12 mpi->planes[1]=((char*)P) + P->componentInfoCr.offset; mpi->planes[2]=((char*)P) + P->componentInfoCb.offset; - mpi->stride[1]=image_width/2; - mpi->stride[2]=image_width/2; + mpi->stride[1]=imgRect.right/2; + mpi->stride[2]=imgRect.right/2; } mpi->flags|=MP_IMGFLAG_DIRECT; @@ -826,8 +863,8 @@ } mpi->planes[0] = (char*)P; - mpi->stride[0] = image_width * 2; - mpi->width=image_width; + mpi->stride[0] = imgRect.right * 2; + mpi->width=imgRect.right; mpi->flags|=MP_IMGFLAG_DIRECT; return VO_TRUE; } @@ -841,7 +878,7 @@ { case VOCTRL_PAUSE: return (int_pause=1); case VOCTRL_RESUME: return (int_pause=0); - case VOCTRL_FULLSCREEN: window_fullscreen(); return VO_TRUE; + case VOCTRL_FULLSCREEN: vo_fs = 1 - vo_fs; window_fullscreen(); return VO_TRUE; case VOCTRL_ONTOP: window_ontop(); return VO_TRUE; case VOCTRL_QUERY_FORMAT: return query_format(*((uint32_t*)data)); #ifdef QUARTZ_ENABLE_YUV @@ -883,6 +920,8 @@ uint32_t d_height; GetWindowPortBounds(theWindow, &winRect); + if (!vo_quartz_fs) + SetRect(&oldWinRect, winRect.left, winRect.top, winRect.right, winRect.bottom); aspect( &d_width, &d_height, A_NOZOOM); @@ -919,11 +958,11 @@ case IMGFMT_UYVY: case IMGFMT_YUY2: { - long scale_X = FixDiv(Long2Fix(dstRect.right - dstRect.left),Long2Fix(image_width)); - long scale_Y = FixDiv(Long2Fix(dstRect.bottom - dstRect.top),Long2Fix(image_height)); + long scale_X = FixDiv(Long2Fix(dstRect.right - dstRect.left),Long2Fix(imgRect.right)); + long scale_Y = FixDiv(Long2Fix(dstRect.bottom - dstRect.top),Long2Fix(imgRect.bottom)); SetIdentityMatrix(&yuv_qt_stuff.matrix); - if (((dstRect.right - dstRect.left) != image_width) || ((dstRect.bottom - dstRect.right) != image_height)) + if (((dstRect.right - dstRect.left) != imgRect.right) || ((dstRect.bottom - dstRect.right) != imgRect.bottom)) { ScaleMatrix(&yuv_qt_stuff.matrix, scale_X, scale_Y, 0, 0); @@ -954,16 +993,15 @@ void window_fullscreen() { - static Rect oldRect; - static Ptr *restoreState = nil; - short width=640; - short height=480; - RGBColor black={0,0,0}; + //static Ptr *restoreState = nil; + //short width=640; + //short height=480; + //RGBColor black={0,0,0}; GDHandle deviceHdl; Rect deviceRect; //go fullscreen - if(!vo_fs) + if(vo_fs) { //BeginFullScreen( &restoreState,nil,&width,&height,nil,&black,nil); HideMenuBar(); @@ -974,9 +1012,6 @@ device_width = deviceRect.right; device_height = deviceRect.bottom; - - //save old window size - GetWindowPortBounds(theWindow, &oldRect); //hide mouse cursor HideCursor(); @@ -984,11 +1019,14 @@ //go fullscreen if (IMGFMT_IS_RGB(image_format)) ChangeWindowAttributes(theWindow, 0, kWindowResizableAttribute); - - MoveWindow (theWindow, 0, 0, 1); - SizeWindow(theWindow, device_width, device_height,1); + if ((!vo_quartz_fs) || + (device_width != winRect.right) || + (device_height != winRect.bottom)) { + MoveWindow (theWindow, 0, 0, 1); + SizeWindow(theWindow, device_width, device_height,1); + } - vo_fs = 1; + vo_quartz_fs = 1; } else //go back to windowed mode { @@ -1009,10 +1047,10 @@ if (IMGFMT_IS_RGB(image_format)) ChangeWindowAttributes(theWindow, kWindowResizableAttribute, 0); - SizeWindow(theWindow, oldRect.right, oldRect.bottom,1); + SizeWindow(theWindow, oldWinRect.right, oldWinRect.bottom,1); RepositionWindow(theWindow, NULL, kWindowCascadeOnMainScreen); - vo_fs = 0; + vo_quartz_fs = 0; } window_resized(); Index: AUTHORS =================================================================== RCS file: /cvsroot/mplayer/main/AUTHORS,v retrieving revision 1.82 diff -u -r1.82 AUTHORS --- AUTHORS 5 May 2004 13:23:49 -0000 1.82 +++ AUTHORS 6 May 2004 08:36:17 -0000 @@ -179,6 +179,8 @@ Dolbeau, Romain * random AltiVec (PowerPC multimedia extensions) stuff + * vo_quartz YUV support & fixes + * endianess fixes Ernesti, Bernd * NetBSD support patches