From fba70ac149f80bb094595108e7dd0706a883fc74 Mon Sep 17 00:00:00 2001 From: Maschell Date: Thu, 30 Dec 2021 14:51:17 +0100 Subject: [PATCH] Don't init external storage when running in MIiMaker --- source/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/main.cpp b/source/main.cpp index 652768b..e5f4f98 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -167,6 +168,12 @@ bool getQuickBoot() { } static void initExternalStorage() { + if (OSGetTitleID() == _SYSGetSystemApplicationTitleId(SYSTEM_APP_ID_MII_MAKER)) { + // nn::spm functions always call OSFatal when they fail, so we make sure have permission to use + // the lib before actually using it. + return; + } + nn::spm::Initialize(); nn::spm::StorageListItem items[0x20];