From 612ba8077fbcfa16970741eb5552f6b0fb9b874d Mon Sep 17 00:00:00 2001 From: atmos4 Date: Sat, 20 Oct 2001 22:29:29 +0000 Subject: [PATCH] Aspect support for vo_mga, you need to use -screenw and -screenh to set your current screen res. Untested! git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2318 b3059339-0415-0410-9bf9-f77b7e298cf2 --- cfg-mplayer.h | 2 ++ libvo/vo_mga.c | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/cfg-mplayer.h b/cfg-mplayer.h index ca314de2b6..d7f90276b5 100644 --- a/cfg-mplayer.h +++ b/cfg-mplayer.h @@ -230,6 +230,8 @@ struct config conf[]={ {"x", &screen_size_x, CONF_TYPE_INT, CONF_RANGE, 0, 4096}, {"y", &screen_size_y, CONF_TYPE_INT, CONF_RANGE, 0, 4096}, {"xy", &screen_size_xy, CONF_TYPE_INT, CONF_RANGE, 0, 4096}, + {"screenw", &vo_screenwidth, CONF_TYPE_INT, CONF_RANGE, 0, 4096}, + {"screenh", &vo_screenheight, CONF_TYPE_INT, CONF_RANGE, 0, 4096}, {"aspect", &movie_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.2, 3.0}, {"noaspect", &movie_aspect, CONF_TYPE_FLAG, 0, 0, 0}, {"monitoraspect", &monitor_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.2, 3.0}, diff --git a/libvo/vo_mga.c b/libvo/vo_mga.c index 7cc5f7417f..bd5c5bcdf8 100644 --- a/libvo/vo_mga.c +++ b/libvo/vo_mga.c @@ -41,6 +41,7 @@ LIBVO_EXTERN(mga) #include "drivers/mga_vid.h" #include "sub.h" +#include "aspect.h" static vo_info_t vo_info = { @@ -58,6 +59,18 @@ init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint3 { char *devname=vo_subdevice?vo_subdevice:"/dev/mga_vid"; + if(vo_screenwidth && vo_screenheight){ + aspect_save_orig(width,height); + aspect_save_prescale(d_width,d_height); + aspect_save_screenres(vo_screenwidth,vo_screenheight); + + if(fullscreen&0x01) /* -fs */ + aspect(&d_width,&d_height,A_NOZOOM); + else + aspect(&d_width,&d_height,A_NOZOOM); + } + + f = open(devname,O_RDWR); if(f == -1) {