From 5e2658c98196f8fd3558a2ffe40bd789ed27e8a3 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 29 Nov 2019 12:37:06 +0100 Subject: m_config: make m_config_cache_write_opt() check/return changes Goes in line with the recent changes to always checking for option value changes. The player core will use this to determine whether it should send additional change events. --- options/m_config.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'options/m_config.h') diff --git a/options/m_config.h b/options/m_config.h index 357dca5d4d..f62bc9670f 100644 --- a/options/m_config.h +++ b/options/m_config.h @@ -340,7 +340,8 @@ bool m_config_cache_get_next_changed(struct m_config_cache *cache, void **out_pt // call. // ptr: points to any field in cache->opts that is managed by an option. If // this is not the case, the function crashes for your own good. -void m_config_cache_write_opt(struct m_config_cache *cache, void *ptr); +// returns: if true, this was an update; if false, shadow had same value +bool m_config_cache_write_opt(struct m_config_cache *cache, void *ptr); // Like m_config_cache_alloc(), but return the struct (m_config_cache->opts) // directly, with no way to update the config. Basically this returns a copy -- cgit v1.2.3