From cf7e4bda92cb48ef21a047e0ce54a82c37814544 Mon Sep 17 00:00:00 2001 From: Nikita Strygin Date: Thu, 16 Jun 2022 21:35:34 +0300 Subject: Implement ExitProcess svc Currently this just stops all the emulation This works under assumption that only application will try to use ExitProcess, with services not touching it If application exits - it quite makes sense to end the emulation --- src/core/hle/kernel/svc.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core/hle') diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 47db0bacf..2ff6d5fa6 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -1726,11 +1726,12 @@ static ResultCode UnmapProcessCodeMemory(Core::System& system, Handle process_ha /// Exits the current process static void ExitProcess(Core::System& system) { auto* current_process = system.Kernel().CurrentProcess(); - UNIMPLEMENTED(); LOG_INFO(Kernel_SVC, "Process {} exiting", current_process->GetProcessID()); ASSERT_MSG(current_process->GetStatus() == ProcessStatus::Running, "Process has already exited"); + + system.Exit(); } static void ExitProcess32(Core::System& system) { -- cgit v1.2.3