Compare commits

...

2 Commits

Author SHA1 Message Date
MaranBr
db9b808a8a Fix the applet control stuck in Mario Kart 8 Deluxe and not break Diablo 3 2025-06-02 16:42:20 -04:00
MaranBr
86f70b0b19 Another attempt to fix MK8D and not break Diablo 3 2025-06-02 14:04:15 -04:00
2 changed files with 9 additions and 3 deletions

View File

@@ -26,7 +26,7 @@ void Applet::UpdateSuspensionStateLocked(bool force_message) {
// Remove any forced resumption.
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;
@@ -36,6 +36,7 @@ void Applet::UpdateSuspensionStateLocked(bool force_message) {
process->Suspend(false);
} else {
process->Suspend(true);
lifecycle_manager.RequestResumeNotification();
}
is_activity_runnable = curr_activity_runnable;
@@ -47,8 +48,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) {
lifecycle_manager.RequestResumeNotification();
if (update_requested_focus_state || was_changed || force_message) {
lifecycle_manager.SignalSystemEventIfNeeded();
}
}

View File

@@ -101,6 +101,12 @@ Result ILibraryAppletAccessor::PushInData(SharedPointer<IStorage> storage) {
Result ILibraryAppletAccessor::PopOutData(Out<SharedPointer<IStorage>> 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()));
}