diff options
author | wm4 <wm4@nowhere> | 2013-07-31 20:44:16 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-07-31 20:53:00 +0200 |
commit | 0656411e97afd5710b02563ee0b28423443592e9 (patch) | |
tree | 36375cff0a58d33e4c0b0ab788e878db334b4e13 /core/m_config.h | |
parent | 42f06fb915856722d2e263aa72d0acaf1e00271c (diff) | |
download | mpv-0656411e97afd5710b02563ee0b28423443592e9.tar.bz2 mpv-0656411e97afd5710b02563ee0b28423443592e9.tar.xz |
m_config: store file local backup options differently
File local options need to backup the global option value while a file
is played. Instead of keeping a pointer in m_config_option for the
backup value, put it into a separate list. This reduces per-option
overhead for a rarely used obscure feature. (This implementation would
have been a bit dumb in pre-mpv m_config, because there local options
were the default, and _all_ options were backed up when starting
playback of a file. This is not the case anymore, and normally only
a very small number of options are backed up by default.)
Diffstat (limited to 'core/m_config.h')
-rw-r--r-- | core/m_config.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/m_config.h b/core/m_config.h index c48a4f1281..1ee7ecf1c0 100644 --- a/core/m_config.h +++ b/core/m_config.h @@ -44,8 +44,6 @@ struct m_config_option { const struct m_option *opt; // Raw value of the option. void *data; - // Raw value of the backup of the global value (or NULL). - void *global_backup; // If this is a suboption, the option that contains this option. struct m_config_option *parent; // If this option aliases another, more important option. The alias_owner @@ -70,6 +68,8 @@ typedef struct m_config { // Depth when recursively including profiles. int profile_depth; + struct m_opt_backup *backup_opts; + bool use_profiles; int (*includefunc)(struct m_config *conf, char *filename); |