mirror of https://github.com/mpv-player/mpv
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
This commit is contained in:
parent
99a2f8a751
commit
612ba8077f
|
@ -230,6 +230,8 @@ struct config conf[]={
|
||||||
{"x", &screen_size_x, CONF_TYPE_INT, CONF_RANGE, 0, 4096},
|
{"x", &screen_size_x, CONF_TYPE_INT, CONF_RANGE, 0, 4096},
|
||||||
{"y", &screen_size_y, 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},
|
{"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},
|
{"aspect", &movie_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.2, 3.0},
|
||||||
{"noaspect", &movie_aspect, CONF_TYPE_FLAG, 0, 0, 0},
|
{"noaspect", &movie_aspect, CONF_TYPE_FLAG, 0, 0, 0},
|
||||||
{"monitoraspect", &monitor_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.2, 3.0},
|
{"monitoraspect", &monitor_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.2, 3.0},
|
||||||
|
|
|
@ -41,6 +41,7 @@ LIBVO_EXTERN(mga)
|
||||||
|
|
||||||
#include "drivers/mga_vid.h"
|
#include "drivers/mga_vid.h"
|
||||||
#include "sub.h"
|
#include "sub.h"
|
||||||
|
#include "aspect.h"
|
||||||
|
|
||||||
static vo_info_t vo_info =
|
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";
|
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);
|
f = open(devname,O_RDWR);
|
||||||
if(f == -1)
|
if(f == -1)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue