Button handling implemented.

This commit is contained in:
2022-08-21 14:00:52 +02:00
parent 9c31f70c57
commit 4840c150c2
4 changed files with 46 additions and 8 deletions

View File

@ -40,11 +40,12 @@ bool Playlist::next_track() {
}
bool Playlist::prev_track() {
log_d("Playlist::prev_track called. current_file is %d", current_file);
if (current_file == 0) {
return false;
set_current_position(0, 0);
} else {
set_current_position(current_file - 1, 0);
}
set_current_position(current_file - 1, 0);
return true;
}