mirror of
https://github.com/switchbrew/nx-hbloader.git
synced 2025-06-20 21:12:39 +02:00
Stub out unused exit logic, close SM handle once we don't need it anymore
This commit is contained in:
parent
549adde3ca
commit
104e0fb0b3
2
Makefile
2
Makefile
@ -57,7 +57,7 @@ CFLAGS += $(INCLUDE) -D__SWITCH__
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions
|
||||
|
||||
ASFLAGS := -g $(ARCH)
|
||||
LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
|
||||
LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) -Wl,-wrap,exit -Wl,-Map,$(notdir $*.map)
|
||||
|
||||
LIBS := -lnx
|
||||
|
||||
|
@ -61,11 +61,10 @@ void __appInit(void)
|
||||
fsdevMountSdmc();
|
||||
}
|
||||
|
||||
void __appExit(void)
|
||||
void __wrap_exit(void)
|
||||
{
|
||||
fsdevUnmountAll();
|
||||
fsExit();
|
||||
smExit();
|
||||
// exit() effectively never gets called, so let's stub it out.
|
||||
fatalSimple(MAKERESULT(Module_HomebrewLoader, 39));
|
||||
}
|
||||
|
||||
static void* g_heapAddr;
|
||||
@ -408,6 +407,7 @@ int main(int argc, char **argv)
|
||||
|
||||
getIsApplication();
|
||||
getIsAutomaticGameplayRecording();
|
||||
smExit(); // Close SM as we don't need it anymore.
|
||||
setupHbHeap();
|
||||
getOwnProcessHandle();
|
||||
loadNro();
|
||||
|
Loading…
Reference in New Issue
Block a user