Skip to content

Commit

Permalink
fixed warning, all eristas are supported, while mariko is not suported
Browse files Browse the repository at this point in the history
  • Loading branch information
Hartie95 committed Feb 21, 2021
1 parent 578dec8 commit 2a90ed1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
14 changes: 5 additions & 9 deletions source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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<FastCFWSwitchErrorGui>("Failed to get hardware type\nError code: "+std::to_string(rc));
}
if (R_FAILED(rc = splGetConfig(static_cast<SplConfigItem>(ExosphereHasRcmBugPatch), &has_rcm_bug_patch))) {
return initially<FastCFWSwitchErrorGui>("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<FastCFWSwitchErrorGui>("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<FastCFWSwitchErrorGui>("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<FastCFWSwitchGui>();
}
Expand Down

0 comments on commit 2a90ed1

Please sign in to comment.