From 3dad4e2a67c38c1c167f58e74d6d9496a3a36c19 Mon Sep 17 00:00:00 2001 From: LiquidFenrir Date: Fri, 11 May 2018 15:59:17 +0200 Subject: [PATCH] fix DEBUG calls --- source/camera.c | 2 +- source/loading.c | 4 +--- source/music.c | 8 ++------ 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/source/camera.c b/source/camera.c index 1d7c355..df7f895 100644 --- a/source/camera.c +++ b/source/camera.c @@ -46,7 +46,7 @@ static u16 * camera_buf = NULL; void exit_qr(qr_data *data) { - DEBUG("Exiting QR"); + DEBUG("Exiting QR\n"); svcSignalEvent(data->cancel); while(!data->finished) svcSleepThread(1000000); diff --git a/source/loading.c b/source/loading.c index 3530ff7..ad616ec 100644 --- a/source/loading.c +++ b/source/loading.c @@ -487,9 +487,7 @@ Result load_audio(Entry_s entry, audio_s *audio) int e = ov_open(file, &audio->vf, NULL, 0); if (e < 0) { - char error[50]; - sprintf(error, "Vorbis: %d\n", e); - DEBUG(error); + DEBUG("Vorbis: %d\n", e); return MAKERESULT(RL_FATAL, RS_INVALIDARG, RM_APPLICATION, RD_NO_DATA); } diff --git a/source/music.c b/source/music.c index f4f0c52..2147436 100644 --- a/source/music.c +++ b/source/music.c @@ -31,9 +31,7 @@ Result update_audio(audio_s *audio) { long size = audio->wave_buf[audio->buf_pos].nsamples * 4 - audio->data_read; - char size_info[50] = {0}; - sprintf(size_info, "Audio Size: %ld\n", size); - DEBUG(size_info); + DEBUG("Audio Size: %ld\n", size); if (audio->wave_buf[audio->buf_pos].status == NDSP_WBUF_DONE) // only run if the current selected buffer has already finished playing { size_t read = ov_read(&audio->vf, (char*)audio->wave_buf[audio->buf_pos].data_vaddr + audio->data_read, size, NULL); // read 1 vorbis packet into wave buffer @@ -46,9 +44,7 @@ Result update_audio(audio_s *audio) ov_open(fmemopen(audio->filebuf, audio->filesize, "rb"), &audio->vf, NULL, 0); // Reopen file. Don't need to reinit channel stuff since it's all the same as before } else // Error :( { - char error[100] = {0}; - sprintf(error, "Vorbis play error: %d\n", read); - DEBUG(error); + DEBUG("Vorbis play error: %d\n", read); ndspChnReset(0); return MAKERESULT(RL_FATAL, RS_INVALIDARG, RM_APPLICATION, RD_NO_DATA); }