From c40069a3810e401862386b737c140e3f590afc8d Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 5 May 2013 19:09:44 +0200 Subject: command: fix DVD angle cycling It didn't wrap around when switching while the last angle is active. --- core/command.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'core/command.c') diff --git a/core/command.c b/core/command.c index 72d6f34469..d44521bf1c 100644 --- a/core/command.c +++ b/core/command.c @@ -471,6 +471,17 @@ static int mp_property_angle(m_option_t *prop, int action, void *arg, resync_audio_stream(sh_audio); } return M_PROPERTY_OK; + case M_PROPERTY_GET_TYPE: { + struct m_option opt = { + .name = prop->name, + .type = CONF_TYPE_INT, + .flags = CONF_RANGE, + .min = 1, + .max = angles, + }; + *(struct m_option *)arg = opt; + return M_PROPERTY_OK; + } } return M_PROPERTY_NOT_IMPLEMENTED; } @@ -1373,8 +1384,7 @@ static const m_option_t mp_properties[] = { { "chapters", mp_property_chapters, CONF_TYPE_INT, 0, 0, 0, NULL }, { "editions", mp_property_editions, CONF_TYPE_INT }, - { "angle", mp_property_angle, CONF_TYPE_INT, - CONF_RANGE, -2, 10, NULL }, + { "angle", mp_property_angle, &m_option_type_dummy }, { "metadata", mp_property_metadata, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL }, M_OPTION_PROPERTY_CUSTOM("pause", mp_property_pause), -- cgit v1.2.3