diff options
author | Daniel Mack <zonque@users.sourceforge.net> | 2004-06-22 22:03:11 +0000 |
---|---|---|
committer | Daniel Mack <zonque@users.sourceforge.net> | 2004-06-22 22:03:11 +0000 |
commit | 336483e7448c24b70cb71e278b888865a96bdf8c (patch) | |
tree | 1ab3109a49ab604891e909c722025f6c9561e3cd /src | |
parent | 0452375833f9eae01a8be14c618953b6a5e536cf (diff) | |
download | xine-lib-336483e7448c24b70cb71e278b888865a96bdf8c.tar.gz xine-lib-336483e7448c24b70cb71e278b888865a96bdf8c.tar.bz2 |
moved a check to *maybe* get rid of a kernel panic caused by drawRect
CVS patchset: 6735
CVS date: 2004/06/22 22:03:11
Diffstat (limited to 'src')
-rw-r--r-- | src/video_out/macosx/video_window.m | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/video_out/macosx/video_window.m b/src/video_out/macosx/video_window.m index e161613b3..5ebdc3a84 100644 --- a/src/video_out/macosx/video_window.m +++ b/src/video_out/macosx/video_window.m @@ -29,7 +29,7 @@ #import "video_window.h" -NSString *XineViewDidResizeNotification = @"XineViewDidResizeNotification"; +static NSString *XineViewDidResizeNotification = @"XineViewDidResizeNotification"; #define DEFAULT_VIDEO_WINDOW_SIZE (NSMakeSize(320, 200)) @@ -513,6 +513,11 @@ NSString *XineViewDidResizeNotification = @"XineViewDidResizeNotification"; - (void) drawRect: (NSRect) rect { [currentContext makeCurrentContext]; + + if (!initDone) { + [currentContext flushBuffer]; + return; + } /* Swap buffers only during the vertical retrace of the monitor. http://developer.apple.com/documentation/GraphicsImaging/Conceptual/OpenGL/chap5/chapter_5_section_44.html */ @@ -523,11 +528,6 @@ NSString *XineViewDidResizeNotification = @"XineViewDidResizeNotification"; /* Black background */ glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - if (!initDone) { - [currentContext flushBuffer]; - return; - } - /* Draw */ glBindTexture (GL_TEXTURE_RECTANGLE_EXT, i_texture); [self drawQuad]; |