From 909e4b7e1f679708428e81703700f3885a7d0a0e Mon Sep 17 00:00:00 2001 From: PabloMK7 Date: Wed, 11 Mar 2026 18:48:15 +0100 Subject: [PATCH] core: apt: Fix GetStartupArgument operation order (#1862) --- src/core/hle/service/apt/apt.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/core/hle/service/apt/apt.cpp b/src/core/hle/service/apt/apt.cpp index 50bb765a2..6d0754c6c 100644 --- a/src/core/hle/service/apt/apt.cpp +++ b/src/core/hle/service/apt/apt.cpp @@ -1250,13 +1250,14 @@ void Module::APTInterface::GetStartupArgument(Kernel::HLERequestContext& ctx) { std::vector param; bool exists = false; - if (auto arg = apt->applet_manager->ReceiveDeliverArg()) { - // TODO: This is a complete guess based on observations. It is unknown how the OtherMedia - // type is handled and how it interacts with the OtherApp type, and it is unknown if - // this (checking the jump parameters) is indeed the way the 3DS checks the types. - const auto& jump_parameters = apt->applet_manager->GetApplicationJumpParameters(); + const auto& jump_parameters = apt->applet_manager->GetApplicationJumpParameters(); - if (jump_parameters.Valid()) { + // TODO: This is a complete guess based on observations. It is unknown how the + // OtherMedia type is handled and how it interacts with the OtherApp type, and it is + // unknown if this (checking the jump parameters) is indeed the way the 3DS checks the + // types. + if (jump_parameters.Valid()) { + if (auto arg = apt->applet_manager->ReceiveDeliverArg()) { param = std::move(arg->param); switch (startup_argument_type) {