summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cfg-mplayer.h7
-rw-r--r--mplayer.c36
2 files changed, 18 insertions, 25 deletions
diff --git a/cfg-mplayer.h b/cfg-mplayer.h
index b99ecc77ea..e01ddac08a 100644
--- a/cfg-mplayer.h
+++ b/cfg-mplayer.h
@@ -44,14 +44,17 @@ struct config conf[]={
CONF_TYPE_PRINT, 0, 0, 0},
{"pp", &divx_quality, CONF_TYPE_INT, CONF_RANGE, 0, 63},
{"br", &encode_bitrate, CONF_TYPE_INT, CONF_RANGE, 10000, 10000000},
+
{"x", &screen_size_x, CONF_TYPE_INT, CONF_RANGE, 1, 4096},
{"y", &screen_size_y, CONF_TYPE_INT, CONF_RANGE, 1, 4096},
{"xy", &screen_size_xy, CONF_TYPE_INT, CONF_RANGE, 1, 4096},
-#ifdef HAVE_XF86VM
{"vm", &vidmode, CONF_TYPE_FLAG, 0, 0, 1},
-#endif
+ {"novm", &vidmode, CONF_TYPE_FLAG, 0, 1, 0},
{"fs", &fullscreen, CONF_TYPE_FLAG, 0, 0, 1},
{"nofs", &fullscreen, CONF_TYPE_FLAG, 0, 1, 0},
+ {"zoom", &softzoom, CONF_TYPE_FLAG, 0, 0, 1},
+ {"nozoom", &softzoom, CONF_TYPE_FLAG, 0, 1, 0},
+
{"idx", &no_index, CONF_TYPE_FLAG, 0, 1, 0},
{"noidx", &no_index, CONF_TYPE_FLAG, 0, 0, 1},
{"verbose", &verbose, CONF_TYPE_INT, CONF_RANGE, 0, 100},
diff --git a/mplayer.c b/mplayer.c
index 64bb256ff7..4f6ae5a8e9 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -419,11 +419,10 @@ char* title="MPlayer";
// screen info:
char* video_driver=NULL; //"mga"; // default
int fullscreen=0;
-#ifdef HAVE_XF86VM
int vidmode=0;
-#endif
-int screen_size_x=SCREEN_SIZE_X;
-int screen_size_y=SCREEN_SIZE_Y;
+int softzoom=0;
+int screen_size_x=0;//SCREEN_SIZE_X;
+int screen_size_y=0;//SCREEN_SIZE_Y;
int screen_size_xy=0;
// movie info:
int movie_size_x=0;
@@ -485,11 +484,11 @@ if(video_driver && strcmp(video_driver,"help")==0){
// check font
if(font_name){
- vo_font=read_font_desc(font_name,font_factor);
+ vo_font=read_font_desc(font_name,font_factor,verbose>1);
if(!vo_font) printf("Can't load font: %s\n",font_name);
} else {
// try default:
- vo_font=read_font_desc(get_path("font/font.desc"),font_factor);
+ vo_font=read_font_desc(get_path("font/font.desc"),font_factor,verbose>1);
}
// check .sub
@@ -517,13 +516,6 @@ if(video_driver && strcmp(video_driver,"help")==0){
return 0;
}
-#ifdef HAVE_XF86VM
-if (!video_driver)
- vidmode=0;
-else if (strcmp(video_driver,"x11"))
- vidmode=0;
-#endif
-
if(!filename){
if(vcd_track) filename="/dev/cdrom";
else {
@@ -1029,12 +1021,6 @@ make_pipe(&keyb_fifo_get,&keyb_fifo_put);
}
#endif
-#ifdef HAVE_XF86VM
- if (vidmode) {
- if ( screen_size_x == SCREEN_SIZE_X ) screen_size_x = 0;
- if ( screen_size_y == SCREEN_SIZE_Y ) screen_size_y = 0;
- } else
-#endif
if(screen_size_xy>0){
if(screen_size_xy<=8){
screen_size_x=screen_size_xy*movie_size_x;
@@ -1043,7 +1029,9 @@ make_pipe(&keyb_fifo_get,&keyb_fifo_put);
screen_size_x=screen_size_xy;
screen_size_y=screen_size_xy*movie_size_y/movie_size_x;
}
- } else {
+ } else if(!vidmode){
+ if(!screen_size_x) screen_size_x=SCREEN_SIZE_X;
+ if(!screen_size_y) screen_size_y=SCREEN_SIZE_Y;
if(screen_size_x<=8) screen_size_x*=movie_size_x;
if(screen_size_y<=8) screen_size_y*=movie_size_y;
}
@@ -1051,14 +1039,16 @@ make_pipe(&keyb_fifo_get,&keyb_fifo_put);
if(verbose) printf("Destination size: %d x %d out_fmt=%0X\n",
screen_size_x,screen_size_y,out_fmt);
- if(verbose) printf("video_out->init(%dx%d->%dx%d,fs=%d,'%s',0x%X)\n",
+ if(verbose) printf("video_out->init(%dx%d->%dx%d,flags=%d,'%s',0x%X)\n",
movie_size_x,movie_size_y,
screen_size_x,screen_size_y,
- fullscreen,title,out_fmt);
+ fullscreen|(vidmode<<1)|(softzoom<<2),
+ title,out_fmt);
if(video_out->init(movie_size_x,movie_size_y,
screen_size_x,screen_size_y,
- fullscreen,title,out_fmt)){
+ fullscreen|(vidmode<<1)|(softzoom<<2),
+ title,out_fmt)){
printf("FATAL: Cannot initialize video driver!\n");exit(1);
}
if(verbose) printf("INFO: Video OUT driver init OK!\n");