diff --git a/options/m_option.h b/options/m_option.h index f179c75494..bcdc1f9fcc 100644 --- a/options/m_option.h +++ b/options/m_option.h @@ -213,6 +213,7 @@ struct m_sub_options { }; #define CONF_TYPE_BOOL (&m_option_type_bool) +#define CONF_TYPE_FLAG (&m_option_type_flag) #define CONF_TYPE_INT (&m_option_type_int) #define CONF_TYPE_INT64 (&m_option_type_int64) #define CONF_TYPE_FLOAT (&m_option_type_float) @@ -232,6 +233,7 @@ struct m_sub_options { // size/alignment requirements for option values in general. union m_option_value { bool bool_; + int flag; // not the C type "bool"! int int_; int64_t int64; float float_; diff --git a/player/client.c b/player/client.c index cf2483b4c2..9b4c83b861 100644 --- a/player/client.c +++ b/player/client.c @@ -970,7 +970,7 @@ void mpv_wakeup(mpv_handle *ctx) // map client API types to internal types static const struct m_option type_conv[] = { [MPV_FORMAT_STRING] = { .type = CONF_TYPE_STRING }, - [MPV_FORMAT_FLAG] = { .type = CONF_TYPE_BOOL }, + [MPV_FORMAT_FLAG] = { .type = CONF_TYPE_FLAG }, [MPV_FORMAT_INT64] = { .type = CONF_TYPE_INT64 }, [MPV_FORMAT_DOUBLE] = { .type = CONF_TYPE_DOUBLE }, [MPV_FORMAT_NODE] = { .type = CONF_TYPE_NODE },