summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-08-27 14:10:38 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-08-27 14:10:38 +0000
commitf10dcbacd5e436f2a177c0b5f7d28f44e4e4d145 (patch)
tree66e6ac438738cade9f7132e1aabeaddd38ccddb6 /libvo
parentc3067ee82f07563ac102cea947707e97e475710f (diff)
downloadmpv-f10dcbacd5e436f2a177c0b5f7d28f44e4e4d145.tar.bz2
mpv-f10dcbacd5e436f2a177c0b5f7d28f44e4e4d145.tar.xz
-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). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29564 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_gl2.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/libvo/vo_gl2.c b/libvo/vo_gl2.c
index 66ea359c4a..6e677a6b1d 100644
--- a/libvo/vo_gl2.c
+++ b/libvo/vo_gl2.c
@@ -419,23 +419,23 @@ static void drawTextureDisplay (void)
}
-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 @@ static int initGl(uint32_t d_width, uint32_t d_height)
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 @@ static void check_events(void)
}
#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 @@ static int control(uint32_t request, void *data, ...)
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 @@ static int control(uint32_t request, void *data, ...)
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: