diff --git a/nx/include/switch/runtime/env.h b/nx/include/switch/runtime/env.h index 66c0d0b9..af2e0d57 100644 --- a/nx/include/switch/runtime/env.h +++ b/nx/include/switch/runtime/env.h @@ -60,8 +60,6 @@ u64 envGetHeapOverrideSize(void); /// Returns true if the environment has an argv array. bool envHasArgv(void); -/// Returns the number of arguments in the argv array. -u64 envGetArgc(void); /// Returns the pointer to the argv array. void* envGetArgv(void); diff --git a/nx/source/runtime/argv.c b/nx/source/runtime/argv.c index 4786ac6f..412b07b0 100644 --- a/nx/source/runtime/argv.c +++ b/nx/source/runtime/argv.c @@ -36,7 +36,7 @@ void argvSetup(void) __system_argc = 0; __system_argv = NULL; - // TODO: Use envHasArgv() here for the NRO case. + // TODO: Use envHasArgv()/envGetArgv() here for the NRO case. if (envIsNso()) { memset(&meminfo, 0, sizeof(meminfo)); diff --git a/nx/source/runtime/env.c b/nx/source/runtime/env.c index fc5b7f0a..6ceb6e31 100644 --- a/nx/source/runtime/env.c +++ b/nx/source/runtime/env.c @@ -11,7 +11,6 @@ static Handle g_mainThreadHandle = INVALID_HANDLE; static LoaderReturnFn g_loaderRetAddr = NULL; static void* g_overrideHeapAddr = NULL; static u64 g_overrideHeapSize = 0; -static u64 g_overrideArgc = 0; static void* g_overrideArgv = NULL; static u64 g_syscallHints[2]; static Handle g_processHandle = INVALID_HANDLE; @@ -69,7 +68,6 @@ void envSetup(void* ctx, Handle main_thread, LoaderReturnFn saved_lr) break; case EntryType_Argv: - g_overrideArgc = ent->Value[0]; g_overrideArgv = (void*) ent->Value[1]; break; @@ -129,10 +127,6 @@ bool envHasArgv(void) { return g_overrideArgv != NULL; } -u64 envGetArgc(void) { - return g_overrideArgc; -} - void* envGetArgv(void) { return g_overrideArgv; }