]> git.tuebingen.mpg.de Git - paraslash.git/commit
play: Fix prev command.
authorAndre Noll <maan@systemlinux.org>
Sun, 22 Sep 2013 14:45:10 +0000 (16:45 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 22 Sep 2013 14:57:12 +0000 (16:57 +0200)
commit20c8622c90f488ab398146a9e5b51d61149e96d3
tree9bb7ffdb5e8adfbbfa067c8674514a03f966f915
parent6824b139a61f9cb01d00daf08beb12cedb8804d3
play: Fix prev command.

The command handler for com_prev() stores the number of the
previous (valid) file in ->next_file of struct play_task and sets
->rq to CRT_FILE_CHANGE. The real work is supposed to be done in
load_next_file() which is called from the main post_select() function.

However, load_next_file() ignores ->next_file and computes the number
of the next file itself. Hence the "prev" command acts exactly as
"next", i.e. it selects the next rather than the previous file.

Fix this by ignoring ->next_file only if ->rq is CRT_NONE, which
indicates a normal end of file condition.
play.c