From 08fc0d2df1693a2ab155bd27952973d323467ee3 Mon Sep 17 00:00:00 2001 From: Slluxx Date: Tue, 31 Oct 2023 15:35:59 +0100 Subject: [PATCH] Fixing a crash when emuiibo is not installed --- Makefile | 2 +- source/util.hpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2b4bbc6..77458df 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,7 @@ INCLUDES := include #ROMFS := romfs APP_TITLE := AmiiboGenerator APP_AUTHOR := Slluxx -APP_VERSION := 2.1.0 +APP_VERSION := 2.1.1 #--------------------------------------------------------------------------------- # options for code generation diff --git a/source/util.hpp b/source/util.hpp index 1f2b93e..0f94033 100644 --- a/source/util.hpp +++ b/source/util.hpp @@ -63,6 +63,10 @@ namespace UTIL static bool checkAmiiboDatabase() { + if (!std::filesystem::exists("sdmc:/emuiibo/")){ + std::filesystem::create_directories("sdmc:/emuiibo/"); + } + if (!std::filesystem::exists("sdmc:/emuiibo/amiibos.json")) { printf("Amiibo database not present. Updating ...\n");