From 67f244c6d4b0ef9ad2e55483508efbf6fe40d03b Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 25 Feb 2014 22:34:32 +0100 Subject: config: don't save options to resume-config that didn't change This is approximate: we read each option value on program start (before starting playback of a file), and when writing the resume config, compare each value to the current state. This also means when a value is changed and then changed back, it's not stored. In particular, option values set in config files and on the command line are considered the default. This should help reducing the numbers of options overridden by the resume config. If too much is overridden, it becomes an inconvenience, because changes in config files will apparently have no effect when resuming a file. Also see github issue #574. --- player/core.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'player/core.h') diff --git a/player/core.h b/player/core.h index 58c1e3793c..e14229174e 100644 --- a/player/core.h +++ b/player/core.h @@ -184,6 +184,7 @@ typedef struct MPContext { int quit_custom_rc; bool has_quit_custom_rc; bool error_playing; + char **resume_defaults; int64_t shown_vframes, shown_aframes; @@ -362,6 +363,7 @@ void clear_audio_decode_buffers(struct MPContext *mpctx); // configfiles.c bool mp_parse_cfgfiles(struct MPContext *mpctx); void mp_load_auto_profiles(struct MPContext *mpctx); +void mp_get_resume_defaults(struct MPContext *mpctx); void mp_load_playback_resume(struct MPContext *mpctx, const char *file); void mp_write_watch_later_conf(struct MPContext *mpctx); struct playlist_entry *mp_check_playlist_resume(struct MPContext *mpctx, -- cgit v1.2.3