summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-21 00:37:12 +0300
committerUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-23 13:46:40 +0300
commitce76dfdd4ac46e955cc57c6f5c7ae98d8018abab (patch)
tree14523421fa502bb930d0209aa31c5c713aa4d382
parenteaab1ce896adbcb58e6503ea2dcf789d99bd29f5 (diff)
downloadmpv-ce76dfdd4ac46e955cc57c6f5c7ae98d8018abab.tar.bz2
mpv-ce76dfdd4ac46e955cc57c6f5c7ae98d8018abab.tar.xz
Move vo_dbpp to options struct
-rw-r--r--cfg-mplayer.h3
-rw-r--r--libvo/old_vo_defines.h2
-rw-r--r--libvo/video_out.c3
-rw-r--r--libvo/video_out.h5
-rw-r--r--options.h1
5 files changed, 6 insertions, 8 deletions
diff --git a/cfg-mplayer.h b/cfg-mplayer.h
index 9a07979cd1..c094a02859 100644
--- a/cfg-mplayer.h
+++ b/cfg-mplayer.h
@@ -90,6 +90,7 @@ const m_option_t tvscan_conf[]={
#define FLAG_ON(optname, varname, flags) {optname, NULL, CONF_TYPE_FLAG, flags, 0, 1, NULL, 1, offsetof(struct MPOpts, varname)}
#define FLAG_OFF(optname, varname, flags) {optname, NULL, CONF_TYPE_FLAG, flags, 1, 0, NULL, 1, offsetof(struct MPOpts, varname)}
#define STRINGLIST(optname, varname, flags) {optname, NULL, CONF_TYPE_STRING_LIST, flags, 0, 0, NULL, 1, offsetof(struct MPOpts, varname)}
+#define INTRANGE(optname, varname, min, max, flags) {optname, NULL, CONF_TYPE_INT, (flags)|CONF_RANGE, min, max, NULL, 1, offsetof(struct MPOpts, varname)}
const m_option_t mplayer_opts[]={
/* name, pointer, type, flags, min, max */
@@ -189,7 +190,7 @@ const m_option_t mplayer_opts[]={
{"fsmode", "-fsmode is obsolete, avoid it and use -fstype instead.\nIf you really want it, try -fsmode-dontuse, but don't report bugs!\n", CONF_TYPE_PRINT, CONF_RANGE, 0, 31, NULL},
{"fsmode-dontuse", &vo_fsmode, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL},
// set bpp (x11+vm, dga, fbdev, vesa, svga?)
- {"bpp", &vo_dbpp, CONF_TYPE_INT, CONF_RANGE, 0, 32, NULL},
+ INTRANGE("bpp", vo_dbpp, 0, 32, 0),
{"colorkey", &vo_colorkey, CONF_TYPE_INT, 0, 0, 0, NULL},
{"nocolorkey", &vo_colorkey, CONF_TYPE_FLAG, 0, 0, 0x1000000, NULL},
{"double", &vo_doublebuffering, CONF_TYPE_FLAG, 0, 0, 1, NULL},
diff --git a/libvo/old_vo_defines.h b/libvo/old_vo_defines.h
index b4003937b6..a8231b970a 100644
--- a/libvo/old_vo_defines.h
+++ b/libvo/old_vo_defines.h
@@ -14,5 +14,5 @@
#define vo_dy global_vo->dy
#define vo_dwidth global_vo->dwidth
#define vo_dheight global_vo->dheight
-
+#define vo_dbpp global_vo->opts->vo_dbpp
#endif
diff --git a/libvo/video_out.c b/libvo/video_out.c
index 1f527af08f..179384fd33 100644
--- a/libvo/video_out.c
+++ b/libvo/video_out.c
@@ -35,9 +35,6 @@ int vo_depthonscreen=0;
int vo_screenwidth=0;
int vo_screenheight=0;
-// requested resolution/bpp: (-x -y -bpp options)
-int vo_dbpp=0;
-
int vo_nomouse_input = 0;
int vo_grabpointer = 1;
int vo_doublebuffering = 1;
diff --git a/libvo/video_out.h b/libvo/video_out.h
index ad298c04f3..70dd3612d8 100644
--- a/libvo/video_out.h
+++ b/libvo/video_out.h
@@ -213,6 +213,8 @@ struct vo {
void *priv;
struct MPOpts *opts;
struct vo_x11_state *x11;
+
+ // requested position/resolution
int dx;
int dy;
int dwidth;
@@ -248,9 +250,6 @@ extern int vo_depthonscreen;
extern int vo_screenwidth;
extern int vo_screenheight;
-// requested resolution/bpp: (-x -y -bpp options)
-extern int vo_dbpp;
-
extern int vo_grabpointer;
extern int vo_doublebuffering;
extern int vo_directrendering;
diff --git a/options.h b/options.h
index 2d6c8d48e4..aa6bb1eee8 100644
--- a/options.h
+++ b/options.h
@@ -6,6 +6,7 @@ typedef struct MPOpts {
char **audio_driver_list;
int fixed_vo;
int vo_ontop;
+ int vo_dbpp;
int correct_pts;
int user_correct_pts;
} MPOpts;