mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-23 21:32:39 +02:00
Skip HID init when applet-type is None.
This commit is contained in:
parent
bddf244d0b
commit
e3f0e08a90
@ -7,6 +7,8 @@ void newlibSetup(void);
|
|||||||
|
|
||||||
void __system_initArgv(void);
|
void __system_initArgv(void);
|
||||||
|
|
||||||
|
extern u32 __nx_applet_type;
|
||||||
|
|
||||||
// Must be a multiple of 0x2000000.
|
// Must be a multiple of 0x2000000.
|
||||||
__attribute__((weak)) size_t __nx_heap_size = 0x2000000*16;
|
__attribute__((weak)) size_t __nx_heap_size = 0x2000000*16;
|
||||||
|
|
||||||
@ -72,9 +74,11 @@ void __attribute__((weak)) __appInit(void)
|
|||||||
if (R_FAILED(rc))
|
if (R_FAILED(rc))
|
||||||
fatalSimple(MAKERESULT(MODULE_LIBNX, LIBNX_INITFAIL_AM));
|
fatalSimple(MAKERESULT(MODULE_LIBNX, LIBNX_INITFAIL_AM));
|
||||||
|
|
||||||
|
if (__nx_applet_type != AppletType_None) {
|
||||||
rc = hidInitialize();
|
rc = hidInitialize();
|
||||||
if (R_FAILED(rc))
|
if (R_FAILED(rc))
|
||||||
fatalSimple(MAKERESULT(MODULE_LIBNX, LIBNX_INITFAIL_HID));
|
fatalSimple(MAKERESULT(MODULE_LIBNX, LIBNX_INITFAIL_HID));
|
||||||
|
}
|
||||||
|
|
||||||
rc = fsInitialize();
|
rc = fsInitialize();
|
||||||
if (R_FAILED(rc))
|
if (R_FAILED(rc))
|
||||||
|
Loading…
Reference in New Issue
Block a user