diff --git a/options/m_property.c b/options/m_property.c index 0d870bd81c..fa91fd1162 100644 --- a/options/m_property.c +++ b/options/m_property.c @@ -352,11 +352,11 @@ void m_properties_print_help_list(struct mp_log *log, mp_info(log, "\nTotal: %d properties\n", count); } -int m_property_bool_ro(int action, void* arg, int var) +int m_property_bool_ro(int action, void* arg, bool var) { switch (action) { case M_PROPERTY_GET: - *(int *)arg = !!var; + *(bool *)arg = !!var; return M_PROPERTY_OK; case M_PROPERTY_GET_TYPE: *(struct m_option *)arg = (struct m_option){.type = CONF_TYPE_BOOL}; diff --git a/options/m_property.h b/options/m_property.h index 0f5b4bc2cf..7e84abc8d7 100644 --- a/options/m_property.h +++ b/options/m_property.h @@ -176,7 +176,7 @@ char* m_properties_expand_string(const struct m_property *prop_list, const char *str, void *ctx); // Trivial helpers for implementing properties. -int m_property_bool_ro(int action, void* arg, int var); +int m_property_bool_ro(int action, void* arg, bool var); int m_property_int_ro(int action, void* arg, int var); int m_property_int64_ro(int action, void* arg, int64_t var); int m_property_float_ro(int action, void* arg, float var);