mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-25 12:42:04 +08:00
Move vo_ontop to options struct
Add a 'struct vo *vo' argument to the x11_common.c functions that access the variable so it's available as vo->opts->vo_ontop. To keep VOs using the old API working create a global vo variable that is set to the currently used old vo. "vo_ontop" will be #defined to "global_vo->opts->vo_ontop", and x11_common.h will add defines like the following when it is included by old VOs: #define vo_x11_ontop() vo_x11_ontop(global_vo) so that they will call the function according to the new declaration.
This commit is contained in:
@@ -1076,8 +1076,8 @@ static int mp_property_vo_flag(m_option_t * prop, int action, void *arg,
|
||||
static int mp_property_ontop(m_option_t * prop, int action, void *arg,
|
||||
MPContext * mpctx)
|
||||
{
|
||||
return mp_property_vo_flag(prop, action, arg, VOCTRL_ONTOP, &vo_ontop,
|
||||
mpctx);
|
||||
return mp_property_vo_flag(prop, action, arg, VOCTRL_ONTOP,
|
||||
&mpctx->opts.vo_ontop, mpctx);
|
||||
}
|
||||
|
||||
/// Display in the root window (RW)
|
||||
|
||||
Reference in New Issue
Block a user