diff options
author | Max Kellermann <max@duempel.org> | 2009-04-25 14:08:31 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-04-25 14:08:31 +0200 |
commit | 616dc9d4659ca7486dfd252efeda0531766409cc (patch) | |
tree | 53de613dc715931919505809467215f9a56125bc /src/playlist.h | |
parent | d2010c0289f97a62ccd71d8ca2af5a4cd0fdcacc (diff) | |
download | mpd-616dc9d4659ca7486dfd252efeda0531766409cc.tar.gz mpd-616dc9d4659ca7486dfd252efeda0531766409cc.tar.xz mpd-616dc9d4659ca7486dfd252efeda0531766409cc.zip |
playlist_control: use GTimer in previousSongInPlaylist()
To determine whether to rewind the current song or to go to the
previous song, use a GTimer instead of manually diffing time(NULL).
Diffstat (limited to 'src/playlist.h')
-rw-r--r-- | src/playlist.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/playlist.h b/src/playlist.h index 4237cea98..57b2450fa 100644 --- a/src/playlist.h +++ b/src/playlist.h @@ -82,6 +82,13 @@ struct playlist { * This variable is only valid if #playing is true. */ int queued; + + /** + * This timer tracks the time elapsed since the last "prev" + * command. If that is less than one second ago, "prev" jumps + * to the previous song instead of rewinding the current song. + */ + GTimer *prev_elapsed; }; /** the global playlist object */ |