mirror of
https://github.com/switchbrew/nx-hbloader.git
synced 2025-06-21 13:32:40 +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
|
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions
|
||||||
|
|
||||||
ASFLAGS := -g $(ARCH)
|
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
|
LIBS := -lnx
|
||||||
|
|
||||||
|
@ -61,11 +61,10 @@ void __appInit(void)
|
|||||||
fsdevMountSdmc();
|
fsdevMountSdmc();
|
||||||
}
|
}
|
||||||
|
|
||||||
void __appExit(void)
|
void __wrap_exit(void)
|
||||||
{
|
{
|
||||||
fsdevUnmountAll();
|
// exit() effectively never gets called, so let's stub it out.
|
||||||
fsExit();
|
fatalSimple(MAKERESULT(Module_HomebrewLoader, 39));
|
||||||
smExit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void* g_heapAddr;
|
static void* g_heapAddr;
|
||||||
@ -408,6 +407,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
getIsApplication();
|
getIsApplication();
|
||||||
getIsAutomaticGameplayRecording();
|
getIsAutomaticGameplayRecording();
|
||||||
|
smExit(); // Close SM as we don't need it anymore.
|
||||||
setupHbHeap();
|
setupHbHeap();
|
||||||
getOwnProcessHandle();
|
getOwnProcessHandle();
|
||||||
loadNro();
|
loadNro();
|
||||||
|
Loading…
Reference in New Issue
Block a user