summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authornplourde <nplourde@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-07-28 22:19:34 +0000
committernplourde <nplourde@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-07-28 22:19:34 +0000
commit0712baca3d34d6d5d3db924e92fe34d7ed688acf (patch)
tree031d34d4e0e6956185a312ddbd930787af65424c /libvo
parent6c88ce105030c84ad39a74f779f93753aa75cefa (diff)
downloadmpv-0712baca3d34d6d5d3db924e92fe34d7ed688acf.tar.bz2
mpv-0712baca3d34d6d5d3db924e92fe34d7ed688acf.tar.xz
properly release window
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16145 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_macosx.m11
1 files changed, 9 insertions, 2 deletions
diff --git a/libvo/vo_macosx.m b/libvo/vo_macosx.m
index 5523777a90..37835520e8 100644
--- a/libvo/vo_macosx.m
+++ b/libvo/vo_macosx.m
@@ -134,6 +134,7 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32
//config OpenGL View
[mpGLView config];
+ [mpGLView reshape];
return 0;
}
@@ -244,8 +245,13 @@ static uint32_t preinit(const char *arg)
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 @@ static uint32_t control(uint32_t request, void *data, ...)
styleMask:NSTitledWindowMask|NSTexturedBackgroundWindowMask|NSClosableWindowMask|NSMiniaturizableWindowMask|NSResizableWindowMask
backing:NSBackingStoreBuffered defer:NO];
+ [window autorelease];
[window setDelegate:mpGLView];
[window setContentView:mpGLView];
[window setInitialFirstResponder:mpGLView];