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.
merge-requests/60/head
Morph 2021-09-25 23:21:08 +07:00
parent 282bdfd1bf
commit 2f5808b7ff
1 changed files with 2 additions and 2 deletions

@ -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) {