diff options
author | Subv <subv2112@gmail.com> | 2015-07-24 04:09:43 +0200 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2015-07-24 04:32:30 +0200 |
commit | 599744921de3160a1f91b78bc5fa5394c9e09730 (patch) | |
tree | 9c2a31867b1bb0190798bac41823d17c27128583 /src/core/hle/service/apt/apt.cpp | |
parent | Service/APT: Return proper parameters in GetLockHandle. (diff) | |
download | yuzu-599744921de3160a1f91b78bc5fa5394c9e09730.tar yuzu-599744921de3160a1f91b78bc5fa5394c9e09730.tar.gz yuzu-599744921de3160a1f91b78bc5fa5394c9e09730.tar.bz2 yuzu-599744921de3160a1f91b78bc5fa5394c9e09730.tar.lz yuzu-599744921de3160a1f91b78bc5fa5394c9e09730.tar.xz yuzu-599744921de3160a1f91b78bc5fa5394c9e09730.tar.zst yuzu-599744921de3160a1f91b78bc5fa5394c9e09730.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/apt/apt.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/core/hle/service/apt/apt.cpp b/src/core/hle/service/apt/apt.cpp index 1988be521..35402341b 100644 --- a/src/core/hle/service/apt/apt.cpp +++ b/src/core/hle/service/apt/apt.cpp @@ -334,7 +334,26 @@ void GetAppCpuTimeLimit(Service::Interface* self) { void PrepareToStartLibraryApplet(Service::Interface* self) { u32* cmd_buff = Kernel::GetCommandBuffer(); AppletId applet_id = static_cast<AppletId>(cmd_buff[1]); - cmd_buff[1] = HLE::Applets::Applet::Create(applet_id).raw; + auto applet = HLE::Applets::Applet::Get(applet_id); + if (applet) { + LOG_WARNING(Service_APT, "applet has already been started id=%08X", applet_id); + cmd_buff[1] = RESULT_SUCCESS.raw; + } else { + cmd_buff[1] = HLE::Applets::Applet::Create(applet_id).raw; + } + LOG_DEBUG(Service_APT, "called applet_id=%08X", applet_id); +} + +void PreloadLibraryApplet(Service::Interface* self) { + u32* cmd_buff = Kernel::GetCommandBuffer(); + AppletId applet_id = static_cast<AppletId>(cmd_buff[1]); + auto applet = HLE::Applets::Applet::Get(applet_id); + if (applet) { + LOG_WARNING(Service_APT, "applet has already been started id=%08X", applet_id); + cmd_buff[1] = RESULT_SUCCESS.raw; + } else { + cmd_buff[1] = HLE::Applets::Applet::Create(applet_id).raw; + } LOG_DEBUG(Service_APT, "called applet_id=%08X", applet_id); } |