From 45c8b97efbaff7a5031b008223eeed56f7b0607a Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 6 Oct 2014 22:07:35 +0200 Subject: player: --save-position-on-quit should always work Now any action that stops playback of a file (even playlist navigation) will save the position. Normal EOF is of course excluded from this, as well as commands that just reload the current file. The option name is now slightly off, although you could argue what the word "quit" means. Fixes #1148 (or at least this is how I understood it). --- player/core.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'player/core.h') 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, -- cgit v1.2.3