mirror of
https://github.com/mpv-player/mpv
synced 2025-01-24 08:33:34 +00:00
Use a new variable for user-supplied monitor-aspect so we can overwrite
a value generated from pixel-aspect if resolution changes git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23896 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
10f6c95996
commit
e94b93b2c4
@ -99,7 +99,7 @@ extern int xinerama_screen;
|
||||
#endif
|
||||
|
||||
/* from libvo/aspect.c */
|
||||
extern float monitor_aspect;
|
||||
extern float force_monitor_aspect;
|
||||
extern float monitor_pixel_aspect;
|
||||
|
||||
extern int sws_flags;
|
||||
@ -213,7 +213,7 @@ m_option_t mplayer_opts[]={
|
||||
// Geometry string
|
||||
{"geometry", &vo_geometry, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
||||
// set aspect ratio of monitor - useful for 16:9 TVout
|
||||
{"monitoraspect", &monitor_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 9.0, NULL},
|
||||
{"monitoraspect", &force_monitor_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 9.0, NULL},
|
||||
{"monitorpixelaspect", &monitor_pixel_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.2, 9.0, NULL},
|
||||
// video mode switching: (x11,xv,dga)
|
||||
{"vm", &vidmode, CONF_TYPE_FLAG, 0, 0, 1, NULL},
|
||||
|
@ -19,6 +19,7 @@ float vo_panscanrange = 1.0;
|
||||
|
||||
#include "video_out.h"
|
||||
|
||||
float force_monitor_aspect=0;
|
||||
float monitor_aspect=0;
|
||||
float monitor_pixel_aspect=1;
|
||||
extern float movie_aspect;
|
||||
@ -55,7 +56,9 @@ void aspect_save_screenres(int scrw, int scrh){
|
||||
#endif
|
||||
aspdat.scrw = scrw;
|
||||
aspdat.scrh = scrh;
|
||||
if (!monitor_aspect)
|
||||
if (force_monitor_aspect)
|
||||
monitor_aspect = force_monitor_aspect;
|
||||
else
|
||||
monitor_aspect = monitor_pixel_aspect * scrw / scrh;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user