diff --git a/src/core/hle/service/apt/apt.cpp b/src/core/hle/service/apt/apt.cpp index 615fe31ea..bd0c49018 100644 --- a/src/core/hle/service/apt/apt.cpp +++ b/src/core/hle/service/apt/apt.cpp @@ -395,7 +395,11 @@ void StartLibraryApplet(Service::Interface* self) { cmd_buff[1] = applet->Start(parameter).raw; } - +void PrepareToCloseApplication(Service::Interface* self) { + u32* cmd_buff = Kernel::GetCommandBuffer(); + cmd_buff[1] = RESULT_SUCCESS.raw; + LOG_WARNING(Service_APT, "(STUBBED) called"); +} void CancelLibraryApplet(Service::Interface* self) { u32* cmd_buff = Kernel::GetCommandBuffer(); u32 exiting = cmd_buff[1] & 0xFF; diff --git a/src/core/hle/service/apt/apt.h b/src/core/hle/service/apt/apt.h index 80325361f..9ad1dcdb8 100644 --- a/src/core/hle/service/apt/apt.h +++ b/src/core/hle/service/apt/apt.h @@ -321,7 +321,16 @@ void PrepareToStartApplication(Service::Interface* self); * 1 : Result of function, 0 on success, otherwise error code */ void StartApplication(Service::Interface* self); - +/** + * APT::PrepareToCloseApplication service function + * Inputs: + * 0 : Command header [0x00180040] + * 1 : u8, Cancel Preload (0 = don't cancel, 1 = cancel) + * Outputs: + * 0 : Return header + * 1 : Result of function, 0 on success, otherwise error code + */ +void PrepareToCloseApplication(Service::Interface* self); /** * APT::AppletUtility service function * Inputs: diff --git a/src/core/hle/service/apt/apt_u.cpp b/src/core/hle/service/apt/apt_u.cpp index e06084a1e..79b41ad5f 100644 --- a/src/core/hle/service/apt/apt_u.cpp +++ b/src/core/hle/service/apt/apt_u.cpp @@ -42,7 +42,7 @@ const Interface::FunctionInfo FunctionTable[] = { {0x001F0084, nullptr, "StartSystemApplet"}, {0x00200044, nullptr, "StartNewestHomeMenu"}, {0x00210000, nullptr, "OrderToCloseApplication"}, - {0x00220040, nullptr, "PrepareToCloseApplication"}, + {0x00220040, PrepareToCloseApplication, "PrepareToCloseApplication"}, {0x00230040, nullptr, "PrepareToJumpToApplication"}, {0x00240044, nullptr, "JumpToApplication"}, {0x002500C0, nullptr, "PrepareToCloseLibraryApplet"},