aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-06-07 22:39:31 +0000
committerGravatar arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-06-07 22:39:31 +0000
commitca36c00e525c51f1c632219ec76bb2b39f380ace (patch)
tree7c7471b81e82d27c76c6af61c4adf325751e634b
parentb3ab3a05905d5ecada3f19df01f6fa890707d56c (diff)
-vm pan&scan fixes by Jesper Svennevid <mplayer@svennevid.ne>
osd fixed by me (don't draw osd outside of visible area) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6333 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libvo/vo_xv.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c
index 5f4eca87e6..ae15c7664d 100644
--- a/libvo/vo_xv.c
+++ b/libvo/vo_xv.c
@@ -101,18 +101,21 @@ static uint32_t dwidth,dheight;
static void (*draw_alpha_fnc)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride);
static void draw_alpha_yv12(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){
+ x0+=(vo_panscan_x>>2);
vo_draw_alpha_yv12(w,h,src,srca,stride,
xvimage[current_buf]->data+xvimage[current_buf]->offsets[0]+
xvimage[current_buf]->pitches[0]*y0+x0,xvimage[current_buf]->pitches[0]);
}
static void draw_alpha_yuy2(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){
+ x0+=(vo_panscan_x>>2);
vo_draw_alpha_yuy2(w,h,src,srca,stride,
xvimage[current_buf]->data+xvimage[current_buf]->offsets[0]+
xvimage[current_buf]->pitches[0]*y0+2*x0,xvimage[current_buf]->pitches[0]);
}
static void draw_alpha_uyvy(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){
+ x0+=(vo_panscan_x>>2);
vo_draw_alpha_yuy2(w,h,src,srca,stride,
xvimage[current_buf]->data+xvimage[current_buf]->offsets[0]+
xvimage[current_buf]->pitches[0]*y0+2*x0+1,xvimage[current_buf]->pitches[0]);
@@ -594,7 +597,7 @@ static void check_events(void)
}
static void draw_osd(void)
-{ vo_draw_text(image_width,image_height,draw_alpha_fnc);}
+{ vo_draw_text(image_width-(vo_panscan_x>>1),image_height,draw_alpha_fnc);}
static void flip_page(void)
{
@@ -853,20 +856,25 @@ static uint32_t control(uint32_t request, void *data, ...)
return query_format(*((uint32_t*)data));
case VOCTRL_GET_IMAGE:
return get_image(data);
- case VOCTRL_FULLSCREEN:
- vo_x11_fullscreen();
- return VO_TRUE;
case VOCTRL_GUISUPPORT:
return VO_TRUE;
case VOCTRL_GET_PANSCAN:
if ( !vo_config_count || !vo_fs ) return VO_FALSE;
return VO_TRUE;
+ case VOCTRL_FULLSCREEN:
+ vo_x11_fullscreen();
+ /* indended, fallthrough to update panscan on fullscreen/windowed switch */
case VOCTRL_SET_PANSCAN:
- if ( vo_fs && ( vo_panscan != vo_panscan_amount ) )
+ if ( ( vo_fs && ( vo_panscan != vo_panscan_amount ) ) || ( !vo_fs && vo_panscan_amount ) )
{
+ int old_y = vo_panscan_y;
panscan_calc();
- XClearWindow(mDisplay, vo_window);
- XFlush(mDisplay);
+
+ if(old_y != vo_panscan_y)
+ {
+ XClearWindow(mDisplay, vo_window);
+ XFlush(mDisplay);
+ }
}
return VO_TRUE;
}