# HG changeset patch # User nplourde # Date 1122589174 0 # Node ID 6ea7c0735fced2a342c4018cbfe6ca0c1852b301 # Parent 8ece260ce923d88623aa557576da99ef1581fc6e properly release window diff -r 8ece260ce923 -r 6ea7c0735fce libvo/vo_macosx.m --- a/libvo/vo_macosx.m Thu Jul 28 21:00:41 2005 +0000 +++ b/libvo/vo_macosx.m Thu Jul 28 22:19:34 2005 +0000 @@ -134,6 +134,7 @@ //config OpenGL View [mpGLView config]; + [mpGLView reshape]; return 0; } @@ -244,8 +245,13 @@ autoreleasepool = [[NSAutoreleasePool alloc] init]; NSApp = [NSApplication sharedApplication]; - mpGLView = [[MPlayerOpenGLView alloc] initWithFrame:NSMakeRect(0, 0, 0, 0) pixelFormat:[MPlayerOpenGLView defaultPixelFormat]]; - [mpGLView autorelease]; + if(!mpGLView) + { + mpGLView = [[MPlayerOpenGLView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100) pixelFormat:[MPlayerOpenGLView defaultPixelFormat]]; + [mpGLView autorelease]; + } + + [mpGLView display]; [mpGLView preinit]; return 0; @@ -281,6 +287,7 @@ styleMask:NSTitledWindowMask|NSTexturedBackgroundWindowMask|NSClosableWindowMask|NSMiniaturizableWindowMask|NSResizableWindowMask backing:NSBackingStoreBuffered defer:NO]; + [window autorelease]; [window setDelegate:mpGLView]; [window setContentView:mpGLView]; [window setInitialFirstResponder:mpGLView];