diff --git a/src/core/hle/service/am/applet.cpp b/src/core/hle/service/am/applet.cpp index 6847f250c..790b6b8fd 100644 --- a/src/core/hle/service/am/applet.cpp +++ b/src/core/hle/service/am/applet.cpp @@ -1,4 +1,6 @@ // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 ReSwitched Team +// SPDX-FileCopyrightText: Copyright 2026 citron Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include "core/core.h" @@ -27,6 +29,7 @@ void Applet::UpdateSuspensionStateLocked(bool force_message) { lifecycle_manager.RemoveForceResumeIfPossible(); // Check if we're runnable. + const bool update_requested_focus_state = lifecycle_manager.UpdateRequestedFocusState(); const bool curr_activity_runnable = lifecycle_manager.IsRunnable(); const bool prev_activity_runnable = is_activity_runnable; const bool was_changed = curr_activity_runnable != prev_activity_runnable; @@ -48,7 +51,7 @@ void Applet::UpdateSuspensionStateLocked(bool force_message) { } // Signal if the focus state was changed or the process state was changed. - if (lifecycle_manager.UpdateRequestedFocusState() || was_changed || force_message) { + if (update_requested_focus_state || was_changed || force_message) { lifecycle_manager.SignalSystemEventIfNeeded(); } } 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 afacc1d6d..fd3ee0103 100644 --- a/src/core/hle/service/am/service/library_applet_accessor.cpp +++ b/src/core/hle/service/am/service/library_applet_accessor.cpp @@ -1,5 +1,6 @@ // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project // SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 ReSwitched Team // SPDX-License-Identifier: GPL-2.0-or-later #include "core/hle/service/am/applet_data_broker.h" @@ -103,6 +104,12 @@ Result ILibraryAppletAccessor::PushInData(SharedPointer storage) { Result ILibraryAppletAccessor::PopOutData(Out> out_storage) { LOG_DEBUG(Service_AM, "called"); + if (auto caller_applet = m_applet->caller_applet.lock(); caller_applet) { + Event m_system_event = caller_applet->lifecycle_manager.GetSystemEvent(); + m_system_event.Signal(); + caller_applet->lifecycle_manager.RequestResumeNotification(); + m_system_event.Clear(); + } R_RETURN(m_broker->GetOutData().Pop(out_storage.Get())); }