From 59688aaf0e1ad2f569bb799bb730de70088d0720 Mon Sep 17 00:00:00 2001 From: Mahyar Koshkouei Date: Wed, 15 Feb 2017 16:53:33 +0000 Subject: [PATCH] Remove error on going up directory Removed an error that would briefly appear on the screen if the user were to attempt to change to the above directory whilst being in the root directory. Signed-off-by: Mahyar Koshkouei --- source/main.c | 8 +++----- source/playback.c | 4 +--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/source/main.c b/source/main.c index aed0372..d486ece 100644 --- a/source/main.c +++ b/source/main.c @@ -260,12 +260,11 @@ int main(int argc, char **argv) u32 kHeld; static u64 mill = 0; - hidScanInput(); - - gfxSwapBuffers(); gfxFlushBuffers(); gspWaitForVBlank(); + gfxSwapBuffers(); + hidScanInput(); kDown = hidKeysDown(); kHeld = hidKeysHeld(); @@ -400,8 +399,7 @@ int main(int argc, char **argv) if((kDown & KEY_B) || ((kDown & KEY_A) && (from == 0 && fileNum == 0))) { - if(chdir("..") != 0) - err_print("chdir"); + chdir(".."); fileNum = 0; from = 0; diff --git a/source/playback.c b/source/playback.c index 4c1990f..ed4d5eb 100644 --- a/source/playback.c +++ b/source/playback.c @@ -206,9 +206,7 @@ void playFile(void* infoIn) while(stop == false) { - gfxSwapBuffers(); - gfxFlushBuffers(); - gspWaitForVBlank(); + svcSleepThread(100 * 1000); /* When the last buffer has finished playing, break. */ if(lastbuf == true && waveBuf[0].status == NDSP_WBUF_DONE &&