diff options
-rw-r--r-- | src/video_out/macosx/video_window.h | 1 | ||||
-rw-r--r-- | src/video_out/macosx/video_window.m | 41 |
2 files changed, 41 insertions, 1 deletions
diff --git a/src/video_out/macosx/video_window.h b/src/video_out/macosx/video_window.h index af84e4c4e..44b157f00 100644 --- a/src/video_out/macosx/video_window.h +++ b/src/video_out/macosx/video_window.h @@ -38,7 +38,6 @@ typedef enum { BOOL initDone; BOOL isFullScreen; XineVideoWindowFullScreenMode fullscreen_mode; - NSOpenGLContext * opengl_context; NSOpenGLContext * fullScreenContext; NSOpenGLContext * currentContext; } diff --git a/src/video_out/macosx/video_window.m b/src/video_out/macosx/video_window.m index b70d9c0ce..d4fc12786 100644 --- a/src/video_out/macosx/video_window.m +++ b/src/video_out/macosx/video_window.m @@ -89,6 +89,14 @@ NSString *XineViewDidResizeNotification = @"XineViewDidResizeNotification"; return self; } +- (void) dealloc +{ + [xineView release]; + + [super dealloc]; +} + + - (XineOpenGLView *) xineView { return xineView; } @@ -212,6 +220,39 @@ NSString *XineViewDidResizeNotification = @"XineViewDidResizeNotification"; return self; } +- (id) initWithCoder:(NSCoder *)coder +{ + [super initWithCoder:coder]; + + self = [self initWithFrame:[self frame]]; + return self; +} + +- (void) encodeWithCoder:(NSCoder *)coder +{ + [super encodeWithCoder:coder]; +} + + +- (void) dealloc { + if (texture_buffer) + free (texture_buffer); + + if (fullScreenContext) { + [NSOpenGLContext clearCurrentContext]; + [fullScreenContext clearDrawable]; + [fullScreenContext release]; + } + + if (currentContext) { + [NSOpenGLContext clearCurrentContext]; + [currentContext clearDrawable]; + [currentContext release]; + } + + [super dealloc]; +} + - (void) reshape { if (!initDone) return; |