From 2a90ed1691e285a3e15764d077a8ba119e809583 Mon Sep 17 00:00:00 2001 From: hartie95 Date: Sun, 21 Feb 2021 23:31:57 +0100 Subject: [PATCH] fixed warning, all eristas are supported, while mariko is not suported --- README.md | 2 +- source/main.cpp | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 00a60a0..1d455b4 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ A tesla based overlay to boot into different payloads on the Nintendo Switch. ## Supported devices -Only Switch consoles supporting the RCM bug are supported, because of the way exospheres reboot to payload and the sx modchip are working. +Only Switch consoles with the old Erista SOC are supported, because exosphere uses a bootrom exploit to reboot to a payload. ## Setup * Setup the [tesla menu](https://github.com/WerWolv/Tesla-Menu) and [nx-ovlloader](https://github.com/WerWolv/ovl-sysmodules) diff --git a/source/main.cpp b/source/main.cpp index d548f6b..ba626cd 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -64,7 +64,6 @@ class FastCFWSwitchErrorGui : public FastCFWSwitchBaseGui { class FastCFWSwitchOverlay : public tsl::Overlay { private: Result splInitializeResult; - static constexpr u32 ExosphereHasRcmBugPatch = 65004; public: // libtesla already initialized fs, hid, pl, pmdmnt, hid:sys and set:sys virtual void initServices() override { @@ -86,17 +85,14 @@ class FastCFWSwitchOverlay : public tsl::Overlay { // check if reboot to payload is supported: Result rc = 0; u64 hardware_type; - u64 has_rcm_bug_patch; if (R_FAILED(rc = splGetConfig(SplConfigItem_HardwareType, &hardware_type))) { return initially("Failed to get hardware type\nError code: "+std::to_string(rc)); } - if (R_FAILED(rc = splGetConfig(static_cast(ExosphereHasRcmBugPatch), &has_rcm_bug_patch))) { - return initially("Failed to get rcm bug state\nError code: "+std::to_string(rc)); - } - if(has_rcm_bug_patch) { - //unsupported Switch model/setup, show error - return initially("This Switch model is not supported\nReboot to payload is not possible\n\non a Mariko or modchipped Switch"); - }else { + const bool is_erista = hardware_type == 0 || hardware_type == 1; + if(!is_erista) { + // unsupported Switch model, show error + return initially("This Switch model is not supported\nReboot to payload is only possible\n\non an Erista Switch"); + } else { // create main GUI with payload selection return initially(); }