From d87d77aadb4c13355c05eb01c4d5eecdd0849567 Mon Sep 17 00:00:00 2001 From: atmos4 Date: Sun, 21 Oct 2001 21:12:00 +0000 Subject: Added image centering, now only screenblanking and hiding the cursor is missing. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2352 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_mga.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libvo') diff --git a/libvo/vo_mga.c b/libvo/vo_mga.c index e3cb652d90..a278ae7c08 100644 --- a/libvo/vo_mga.c +++ b/libvo/vo_mga.c @@ -108,6 +108,10 @@ char *devname=vo_subdevice?vo_subdevice:"/dev/mga_vid"; mga_vid_config.dest_height= d_height; mga_vid_config.x_org= 0; // (720-mga_vid_config.dest_width)/2; mga_vid_config.y_org= 0; // (576-mga_vid_config.dest_height)/2; + if(vo_screenwidth && vo_screenheight){ + mga_vid_config.x_org=(vo_screenwidth-d_width)/2; + mga_vid_config.y_org=(vo_screenheight-d_height)/2; + } mga_vid_config.version=MGA_VID_VERSION; -- cgit v1.2.3