summaryrefslogtreecommitdiffstats
path: root/command.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-25 07:12:05 +0300
committerUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-26 01:19:29 +0300
commit4db72f6a8006ff137a7d6b8fcbc07da4fa94b9e0 (patch)
tree106a67ab5b522aaa7ae01e46fe3db5ec5d457323 /command.c
parenta0de759a213120ed38c25a6b6d3811709010e2a5 (diff)
downloadmpv-4db72f6a8006ff137a7d6b8fcbc07da4fa94b9e0.tar.bz2
mpv-4db72f6a8006ff137a7d6b8fcbc07da4fa94b9e0.tar.xz
Move vo_gamma_* to options struct
Diffstat (limited to 'command.c')
-rw-r--r--command.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/command.c b/command.c
index 501a35f8dc..cb277ac5c5 100644
--- a/command.c
+++ b/command.c
@@ -1127,7 +1127,8 @@ static int mp_property_framedropping(m_option_t *prop, int action,
static int mp_property_gamma(m_option_t *prop, int action, void *arg,
MPContext *mpctx)
{
- int *gamma = prop->priv, r, val;
+ int *gamma = (int *)((char *)&mpctx->opts + (int)prop->priv);
+ int r, val;
if (!mpctx->sh_video)
return M_PROPERTY_UNAVAILABLE;
@@ -2026,15 +2027,15 @@ static const m_option_t mp_properties[] = {
{ "framedropping", mp_property_framedropping, CONF_TYPE_INT,
M_OPT_RANGE, 0, 2, NULL },
{ "gamma", mp_property_gamma, CONF_TYPE_INT,
- M_OPT_RANGE, -100, 100, &vo_gamma_gamma },
+ M_OPT_RANGE, -100, 100, (void *)offsetof(struct MPOpts, vo_gamma_gamma)},
{ "brightness", mp_property_gamma, CONF_TYPE_INT,
- M_OPT_RANGE, -100, 100, &vo_gamma_brightness },
+ M_OPT_RANGE, -100, 100, (void *)offsetof(struct MPOpts, vo_gamma_brightness) },
{ "contrast", mp_property_gamma, CONF_TYPE_INT,
- M_OPT_RANGE, -100, 100, &vo_gamma_contrast },
+ M_OPT_RANGE, -100, 100, (void *)offsetof(struct MPOpts, vo_gamma_contrast) },
{ "saturation", mp_property_gamma, CONF_TYPE_INT,
- M_OPT_RANGE, -100, 100, &vo_gamma_saturation },
+ M_OPT_RANGE, -100, 100, (void *)offsetof(struct MPOpts, vo_gamma_saturation) },
{ "hue", mp_property_gamma, CONF_TYPE_INT,
- M_OPT_RANGE, -100, 100, &vo_gamma_hue },
+ M_OPT_RANGE, -100, 100, (void *)offsetof(struct MPOpts, vo_gamma_hue) },
{ "panscan", mp_property_panscan, CONF_TYPE_FLOAT,
M_OPT_RANGE, 0, 1, NULL },
{ "vsync", mp_property_vsync, CONF_TYPE_FLAG,