From c60303e1c7341522872fe29350bfcee541585608 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Tue, 20 Oct 2020 00:49:46 +0100 Subject: [PATCH] 3DS: More error handling --- src/Backends/Audio/SoftwareMixer/3DS.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Backends/Audio/SoftwareMixer/3DS.cpp b/src/Backends/Audio/SoftwareMixer/3DS.cpp index bd35404b..1b0755d3 100644 --- a/src/Backends/Audio/SoftwareMixer/3DS.cpp +++ b/src/Backends/Audio/SoftwareMixer/3DS.cpp @@ -93,7 +93,9 @@ unsigned long SoftwareMixerBackend_Init(void (*callback)(long *stream, size_t fr if (stream_buffer != NULL) { - if (R_SUCCEEDED(ndspInit())) + Result rc = ndspInit(); + + if (R_SUCCEEDED(rc)) { ndspSetCallback(Callback, NULL); @@ -137,7 +139,10 @@ unsigned long SoftwareMixerBackend_Init(void (*callback)(long *stream, size_t fr } else { - Backend_PrintError("ndspInit failed"); + if (R_SUMMARY(rc) == RS_NOTFOUND && R_MODULE(rc) == RM_DSP) + Backend_PrintError("Could not load DSP firmware - you might need to dump yours manually"); + else + Backend_PrintError("ndspInit failed in SoftwareMixerBackend_Init"); } linearFree(stream_buffer);