Skip to content

Commit 68f4534

Browse files
committed
init amsBpc outside of initServices, since there should be no sm session when doing it
1 parent a0f8868 commit 68f4534

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ include $(DEVKITPRO)/libnx/switch_rules
3838
# NACP building is skipped as well.
3939
#---------------------------------------------------------------------------------
4040
APP_TITLE := fastCFWswitch
41-
APP_VERSION := 1.3.0
41+
APP_VERSION := 1.3.0-B3
4242

4343
TARGET := $(notdir $(CURDIR))
4444
BUILD := build

source/main.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,13 @@ class FastCFWSwitchOverlay : public tsl::Overlay {
7474
private:
7575
Result splInitializeResult;
7676
Result spsmInitializeResult;
77-
Result amsBpcInitializeResult;
7877
bool useClassic;
7978
public:
8079
// libtesla already initialized fs, hid, pl, pmdmnt, hid:sys and set:sys
8180
virtual void initServices() override {
8281
splInitializeResult = splInitialize();
83-
8482
spsmInitializeResult = spsmInitialize();
85-
amsBpcInitializeResult = amsBpcInitialize();
83+
8684

8785
} // Called at the start to initialize all services necessary for this Overlay
8886
virtual void exitServices() override {
@@ -99,10 +97,9 @@ class FastCFWSwitchOverlay : public tsl::Overlay {
9997
//unable to init spl, cant reboot this way
10098
return initially<FastCFWSwitchErrorGui>("Failed to init spl service\nError code: "+std::to_string(splInitializeResult));
10199
}
102-
if(R_FAILED(spsmInitializeResult)){
100+
//amsBpc is initialiced here, since the sm session is already closed by now
101+
if(R_FAILED(spsmInitializeResult) || R_FAILED(amsBpcInitialize())){
103102
useClassic = true;
104-
} else if(R_FAILED(amsBpcInitializeResult)){
105-
useClassic=true;
106103
}
107104

108105
// check if reboot to payload is supported:

0 commit comments

Comments
 (0)