From 16f25644788e38d32665529e884c2f5987effaf8 Mon Sep 17 00:00:00 2001 From: Maufeat Date: Sat, 7 Feb 2026 02:12:04 +0100 Subject: [PATCH] [am] terminate app, if caller applet is available (#3486) Changes ExitProcessAndReturn to terminate process if caller is available (e.g. a parent applet) and start program_index 0 if not. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3486 Reviewed-by: DraVee Reviewed-by: crueter Co-authored-by: Maufeat Co-committed-by: Maufeat --- .../hle/service/am/service/library_applet_self_accessor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/hle/service/am/service/library_applet_self_accessor.cpp b/src/core/hle/service/am/service/library_applet_self_accessor.cpp index 0335ae5be6..4a1d1f97d3 100644 --- a/src/core/hle/service/am/service/library_applet_self_accessor.cpp +++ b/src/core/hle/service/am/service/library_applet_self_accessor.cpp @@ -181,12 +181,12 @@ Result ILibraryAppletSelfAccessor::ExitProcessAndReturn() { LOG_INFO(Service_AM, "called"); if (const auto caller_applet = m_applet->caller_applet.lock(); caller_applet) { - system.GetUserChannel() = caller_applet->user_channel_launch_parameter; + m_applet->process->Terminate(); } else { system.GetUserChannel() = m_applet->user_channel_launch_parameter; + system.ExecuteProgram(0); } - system.ExecuteProgram(0); R_SUCCEED(); }