diff options
author | wm4 <wm4@nowhere> | 2016-10-22 16:02:52 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-10-22 16:02:52 +0200 |
commit | bf5c4c42fa4366b707234e8feb5036ca3c03f056 (patch) | |
tree | 077f58bd54b1539eaa51e516420bfc720978c94e /options | |
parent | 11b8cbcce7efd02bee5c7427a4fa157bf20199e4 (diff) | |
download | mpv-bf5c4c42fa4366b707234e8feb5036ca3c03f056.tar.bz2 mpv-bf5c4c42fa4366b707234e8feb5036ca3c03f056.tar.xz |
command: silence deprecation warnings with --reset-on-next-file=all
--reset-on-next-file=all triggers m_config_backup_all_opts(), which
backups all options (even deprecated ones). Later, when the option
values are reset with m_config_restore_backups(), mp_on_set_option() is
called, which in turn calls mp_property_do_silent(), which in turn will
call mp_property_generic_option() and m_config_get_co(), which triggers
the deprecation message.
Unfortunately there's no good way to determine whether an option has
actually changed (there's no option value compare operation), so the
deprecated options have to be set no matter what. On the other hand, we
can't pass through additional flags through the property layer. So we
add a dumb global flag to silence the deprecation warnings in these
cases.
Fortunately m_config_get_co_raw() works to silence the warnings.
m_config_get_co() also resolves aliases (deprecated and non-deprecated),
but aliased options are handled differently by the option-property
bridge, so we don't need to do that here, so the only purpose of it is
to trigger a warning for deprecated (non-alias) options.
Diffstat (limited to 'options')
0 files changed, 0 insertions, 0 deletions