From 2f5808b7ffd168e1ab3ac7e453f8936098350e58 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Sat, 25 Sep 2021 23:21:08 -0400 Subject: [PATCH] service: am: Make use of Exit to exit the currently running application This also moves the call to the end to ensure services are properly destructed on exit. --- src/core/hle/service/am/am.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 8c2e2f920..49e9787a4 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -332,10 +332,10 @@ ISelfController::~ISelfController() = default; void ISelfController::Exit(Kernel::HLERequestContext& ctx) { LOG_DEBUG(Service_AM, "called"); - system.Shutdown(); - IPC::ResponseBuilder rb{ctx, 2}; rb.Push(ResultSuccess); + + system.Exit(); } void ISelfController::LockExit(Kernel::HLERequestContext& ctx) {