aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/service/apt/apt.cpp
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2017-09-23 14:01:04 -0500
committerSubv <subv2112@gmail.com>2017-09-24 08:59:31 -0500
commit7096f01c14ff76aefd829ae449a8ab5d474eacf7 (patch)
tree55aa778db706781b0dc9c5f677bb6ecd4c0c360e /src/core/hle/service/apt/apt.cpp
parentb57d58c0dc94857d28a3ef197d9656f0fbad8e08 (diff)
HLE/APT: Always return an error from PrepareToStartNewestHomeMenu so that the Home Menu doesn't try to reboot the system.
As per 3dbrew: "During Home Menu start-up it uses APT:PrepareToStartNewestHomeMenu. If that doesn't return an error(normally NS returns 0xC8A0CFFC for that), Home Menu starts a hardware reboot with APT:StartNewestHomeMenu etc. "
Diffstat (limited to 'src/core/hle/service/apt/apt.cpp')
-rw-r--r--src/core/hle/service/apt/apt.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/hle/service/apt/apt.cpp b/src/core/hle/service/apt/apt.cpp
index ea964bab1..490c14605 100644
--- a/src/core/hle/service/apt/apt.cpp
+++ b/src/core/hle/service/apt/apt.cpp
@@ -776,6 +776,20 @@ void PrepareToStartLibraryApplet(Service::Interface* self) {
LOG_DEBUG(Service_APT, "called applet_id=%08X", applet_id);
}
+void PrepareToStartNewestHomeMenu(Service::Interface* self) {
+ IPC::RequestParser rp(Kernel::GetCommandBuffer(), 0x1A, 0, 0); // 0x1A0000
+ IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
+
+ // TODO(Subv): This command can only be called by a System Applet (return 0xC8A0CC04 otherwise).
+
+ // This command must return an error when called, otherwise the Home Menu will try to reboot the
+ // system.
+ rb.Push(ResultCode(ErrorDescription::AlreadyExists, ErrorModule::Applet,
+ ErrorSummary::InvalidState, ErrorLevel::Status));
+
+ LOG_DEBUG(Service_APT, "called");
+}
+
void PreloadLibraryApplet(Service::Interface* self) {
IPC::RequestParser rp(Kernel::GetCommandBuffer(), 0x16, 1, 0); // 0x160040
AppletId applet_id = static_cast<AppletId>(rp.Pop<u32>());