summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
Diffstat (limited to 'player')
-rw-r--r--player/core.h4
-rw-r--r--player/loadfile.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/player/core.h b/player/core.h
index a0c9db2cc5..3b4a9f1fa1 100644
--- a/player/core.h
+++ b/player/core.h
@@ -41,6 +41,10 @@ enum stop_play_reason {
PT_QUIT, // stop playback, quit player
};
+// stop_play_reason that is an explicit user abort.
+#define PT_IS_QUIT(x) ((x) == PT_NEXT_ENTRY || (x) == PT_CURRENT_ENTRY || \
+ (x) == PT_STOP || (x) == PT_QUIT)
+
enum exit_reason {
EXIT_NONE,
EXIT_QUIT,
diff --git a/player/loadfile.c b/player/loadfile.c
index 23ffa80684..b07bdc6e3c 100644
--- a/player/loadfile.c
+++ b/player/loadfile.c
@@ -1196,7 +1196,7 @@ terminate_playback:
if (mpctx->stop_play != AT_END_OF_FILE)
clear_audio_output_buffers(mpctx);
- if (opts->position_save_on_quit && mpctx->stop_play == PT_QUIT)
+ if (opts->position_save_on_quit && PT_IS_QUIT(mpctx->stop_play))
mp_write_watch_later_conf(mpctx);
if (mpctx->step_frames)