From fe7db610355b623305d08135869b3f4ff4487b6d Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 19 Sep 2016 19:51:26 +0200 Subject: options: slightly better option update mechanism Extend the flag-based notification mechanism that was used via M_OPT_TERM. Make the vo_opengl update mechanism use this (which, btw., also fixes compilation with OpenGL renderers forcibly disabled). While this adds a 3rd mechanism and just seems to further the chaos, I'd rather have a very simple mechanism now, than actually furthering the mess by mixing old and new update mechanisms. In particular, we'll be able to remove quite some property implementations, and replace them with much simpler update handling. The new update mechanism can also more easily refactored once we have a final mechanism that handles everything in an uniform way. --- player/main.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'player/main.c') diff --git a/player/main.c b/player/main.c index 12f0191fc6..334224d6a6 100644 --- a/player/main.c +++ b/player/main.c @@ -359,6 +359,9 @@ struct MPContext *mp_create(void) mpctx->mconfig->option_set_callback = mp_on_set_option; mpctx->mconfig->option_set_callback_cb = mpctx; + mpctx->mconfig->option_change_callback = mp_option_change_callback; + mpctx->mconfig->option_change_callback_ctx = mpctx; + return mpctx; } -- cgit v1.2.3