Pause immediately

Fixed an issue whereby music was not paused instantly after user input,
but only after the currently playing buffer had finished playing.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
This commit is contained in:
Mahyar Koshkouei
2017-01-28 00:36:34 +00:00
parent 25e3c166e8
commit 14d2660977
2 changed files with 2 additions and 1 deletions

View File

@@ -109,6 +109,7 @@ int playFile(const char* file)
if(kDown & (KEY_A | KEY_R))
{
playing = !playing;
ndspChnSetPaused(CHANNEL, !ndspChnIsPaused(CHANNEL));
printf("\33[2K\r%s", playing == false ? "Paused" : "");
}