From 92555268abc9731cceed57f4f90e96c8f4db731d Mon Sep 17 00:00:00 2001 From: RocketRobz Date: Thu, 11 Oct 2018 17:25:21 -0600 Subject: [PATCH] Only boot .firm payloads on 3DS consoles --- arm9/source/file_browse.cpp | 4 ++-- arm9/source/main.cpp | 6 ++++++ arm9/source/main.h | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/arm9/source/file_browse.cpp b/arm9/source/file_browse.cpp index 8b4df79..d8d3602 100644 --- a/arm9/source/file_browse.cpp +++ b/arm9/source/file_browse.cpp @@ -94,8 +94,8 @@ void getDirectoryContents (vector& dirContents) { || (dirEntry.name.substr(dirEntry.name.find_last_of(".") + 1) == "NDS") || (dirEntry.name.substr(dirEntry.name.find_last_of(".") + 1) == "argv") || (dirEntry.name.substr(dirEntry.name.find_last_of(".") + 1) == "ARGV") - || (isDSiMode() && sdMounted && dirEntry.name.substr(dirEntry.name.find_last_of(".") + 1) == "firm") - || (isDSiMode() && sdMounted && dirEntry.name.substr(dirEntry.name.find_last_of(".") + 1) == "FIRM")) + || (isDSiMode() && is3DS && sdMounted && dirEntry.name.substr(dirEntry.name.find_last_of(".") + 1) == "firm") + || (isDSiMode() && is3DS && sdMounted && dirEntry.name.substr(dirEntry.name.find_last_of(".") + 1) == "FIRM")) { dirEntry.isApp = true; } else { diff --git a/arm9/source/main.cpp b/arm9/source/main.cpp index c0c8dff..ddcef2a 100644 --- a/arm9/source/main.cpp +++ b/arm9/source/main.cpp @@ -41,6 +41,7 @@ char titleName[32] = {" "}; int screenMode = 0; bool isRegularDS = true; +bool is3DS = true; bool applaunch = false; @@ -132,6 +133,11 @@ int main(int argc, char **argv) { yHeld = true; } sdMounted = sdMount(); + if (access("sd:/Nintendo 3DS", F_OK) != 0) { + is3DS = false; + } + } else { + is3DS = false; } if (!isDSiMode() || !yHeld) { flashcardMounted = flashcardMount(); diff --git a/arm9/source/main.h b/arm9/source/main.h index 9f33b80..a7b1334 100644 --- a/arm9/source/main.h +++ b/arm9/source/main.h @@ -9,9 +9,9 @@ extern char titleName[32]; extern int screenMode; extern bool isRegularDS; +extern bool is3DS; extern bool applaunch; - #endif //MAIN_H