Mercurial > mplayer.hg
changeset 29522:26ca161275d6
-vo gl2 resize does not need to modify its arguments, so pass int instead of int *.
In particular, this avoids modifying vo_dwidth/vo_dheight which should only
be modified by the "windowing layer" (w32_common, x11_common).
author | reimar |
---|---|
date | Thu, 27 Aug 2009 14:10:38 +0000 |
parents | f17b515cb326 |
children | 00f8d4ca123f |
files | libvo/vo_gl2.c |
diffstat | 1 files changed, 12 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_gl2.c Thu Aug 27 14:07:15 2009 +0000 +++ b/libvo/vo_gl2.c Thu Aug 27 14:10:38 2009 +0000 @@ -419,23 +419,23 @@ } -static void resize(int *x,int *y){ - mp_msg(MSGT_VO,MSGL_V,"[gl2] Resize: %dx%d\n",*x,*y); +static void resize(int x,int y){ + mp_msg(MSGT_VO,MSGL_V,"[gl2] Resize: %dx%d\n",x,y); if( vo_fs ) { glClear(GL_COLOR_BUFFER_BIT); - aspect(x, y, A_ZOOM); + aspect(&x, &y, A_ZOOM); panscan_calc(); - *x += vo_panscan_x; - *y += vo_panscan_y; - glViewport( (vo_screenwidth-*x)/2, (vo_screenheight-*y)/2, *x, *y); + x += vo_panscan_x; + y += vo_panscan_y; + glViewport( (vo_screenwidth-x)/2, (vo_screenheight-y)/2, x, y); } else { //aspect(x, y, A_NOZOOM); if (WinID >= 0) { - int top = 0, left = 0, w = *x, h = *y; + int top = 0, left = 0, w = x, h = y; geometry(&top, &left, &w, &h, vo_screenwidth, vo_screenheight); glViewport(top, left, w, h); } else - glViewport( 0, 0, *x, *y ); + glViewport( 0, 0, x, y ); } glMatrixMode(GL_PROJECTION); @@ -597,7 +597,7 @@ glValName(gl_bitmap_format), glValName(gl_bitmap_type), rgb_sz, r_sz, g_sz, b_sz, a_sz, glValName(gl_internal_format)); - resize(&d_width, &d_height); + resize(d_width, d_height); glClearColor( 0.0f,0.0f,0.0f,0.0f ); glClear( GL_COLOR_BUFFER_BIT ); @@ -718,7 +718,7 @@ } #endif e=vo_check_events(); - if(e&VO_EVENT_RESIZE) resize(&vo_dwidth, &vo_dheight); + if(e&VO_EVENT_RESIZE) resize(vo_dwidth, vo_dheight); if(e&VO_EVENT_EXPOSE && int_pause) flip_page(); } @@ -891,7 +891,7 @@ vo_fullscreen(); if (setGlWindow(&gl_vinfo, &gl_context, vo_window) == SET_WINDOW_REINIT) initGl(vo_dwidth, vo_dheight); - resize(&vo_dwidth, &vo_dheight); + resize(vo_dwidth, vo_dheight); return VO_TRUE; case VOCTRL_BORDER: vo_border(); @@ -899,7 +899,7 @@ case VOCTRL_GET_PANSCAN: return VO_TRUE; case VOCTRL_SET_PANSCAN: - resize (&vo_dwidth, &vo_dheight); + resize(vo_dwidth, vo_dheight); return VO_TRUE; #ifndef GL_WIN32 case VOCTRL_SET_EQUALIZER: