# HG changeset patch # User reimar # Date 1347561012 0 # Node ID a10c7a7a9232a8193c9e14b1785b76e28956972d # Parent d01a5c88bcc9f9f41ae4fb64e1a315364620d4e8 Move some code around to make splitting into vo-specific and generic code easier. diff -r d01a5c88bcc9 -r a10c7a7a9232 libvo/vo_corevideo.h --- a/libvo/vo_corevideo.h Thu Sep 13 18:07:14 2012 +0000 +++ b/libvo/vo_corevideo.h Thu Sep 13 18:30:12 2012 +0000 @@ -84,7 +84,7 @@ //window & rendering - (void) preinit; -- (void) config; +- (void) config:(uint32_t)width:(uint32_t)height:(uint32_t)flags; - (void) prepareOpenGL; - (void) render; - (void) reshape; diff -r d01a5c88bcc9 -r a10c7a7a9232 libvo/vo_corevideo.m --- a/libvo/vo_corevideo.m Thu Sep 13 18:07:14 2012 +0000 +++ b/libvo/vo_corevideo.m Thu Sep 13 18:30:12 2012 +0000 @@ -190,21 +190,14 @@ if(!shared_buffer) { - config_movie_aspect((float)d_width/d_height); - - vo_dwidth = d_width *= mpGLView->winSizeMult; - vo_dheight = d_height *= mpGLView->winSizeMult; - image_data = malloc(image_height*image_stride); image_datas[0] = image_data; if (vo_doublebuffering) image_datas[1] = malloc(image_height*image_stride); image_page = 0; - vo_fs = flags & VOFLAG_FULLSCREEN; - //config OpenGL View - [mpGLView config]; + [mpGLView config:d_width:d_height:flags]; [mpGLView reshape]; [[mpGLView window] setTitle:[NSString stringWithCString:vo_wintitle ? vo_wintitle : title]]; } @@ -526,10 +519,15 @@ [super dealloc]; } -- (void) config +- (void) config:(uint32_t)width:(uint32_t)height:(uint32_t)flags { CVReturn error = kCVReturnSuccess; + config_movie_aspect((float)width/height); + + vo_dwidth = width *= mpGLView->winSizeMult; + vo_dheight = height *= mpGLView->winSizeMult; + //config window [window setContentSize:NSMakeSize(vo_dwidth, vo_dheight)]; @@ -560,6 +558,8 @@ //show window [window makeKeyAndOrderFront:self]; + vo_fs = flags & VOFLAG_FULLSCREEN; + if(vo_rootwin) [self rootwin];