From 7df3692bcd4dd6ed3c94bc92c0aca89eef729381 Mon Sep 17 00:00:00 2001 From: MaranBr Date: Sun, 25 May 2025 18:56:29 +0000 Subject: [PATCH] Fixes the softlock after the controller applet exits in Mario Kart 8 Deluxe (#127) This is a simple workaround created by Exverge for Suyu and ported to Eden by me. I believe it is safe to integrate into the project for now, until we can figure out a better way to handle this. Co-authored-by: MaranBr Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/127 --- .../hle/service/am/service/library_applet_accessor.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/core/hle/service/am/service/library_applet_accessor.cpp b/src/core/hle/service/am/service/library_applet_accessor.cpp index cda8c3eb87..10a8bac218 100644 --- a/src/core/hle/service/am/service/library_applet_accessor.cpp +++ b/src/core/hle/service/am/service/library_applet_accessor.cpp @@ -101,6 +101,16 @@ Result ILibraryAppletAccessor::PushInData(SharedPointer storage) { Result ILibraryAppletAccessor::PopOutData(Out> out_storage) { LOG_DEBUG(Service_AM, "called"); + if (auto caller = m_applet->caller_applet.lock(); caller != nullptr) { + caller->SetInteractibleLocked(true); + caller->lifecycle_manager.SetFocusState(FocusState::InFocus); + caller->lifecycle_manager.UpdateRequestedFocusState(); + caller->lifecycle_manager.SetResumeNotificationEnabled(true); + caller->lifecycle_manager.RequestResumeNotification(); + caller->UpdateSuspensionStateLocked(true); + } else { + LOG_CRITICAL(Service_AM, "Caller applet pointer is invalid."); + } R_RETURN(m_broker->GetOutData().Pop(out_storage.Get())); }