mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Make the Play / Pause option restart playback if its stopped also
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12738 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6f2bb422c0
commit
6e44209a4c
3 changed files with 17 additions and 2 deletions
|
@ -29,7 +29,16 @@ bool prevtrack(void)
|
|||
|
||||
bool play(void)
|
||||
{
|
||||
if (api->audio_status() & AUDIO_STATUS_PAUSE)
|
||||
int audio_status = api->audio_status();
|
||||
if (!audio_status && api->global_status->resume_index != -1)
|
||||
{
|
||||
if (api->playlist_resume() != -1)
|
||||
{
|
||||
api->playlist_start(api->global_status->resume_index,
|
||||
api->global_status->resume_offset);
|
||||
}
|
||||
}
|
||||
else if (audio_status & AUDIO_STATUS_PAUSE)
|
||||
api->audio_resume();
|
||||
else
|
||||
api->audio_pause();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue