mirror of
https://codeberg.org/yuzu-emu/yuzu.git
synced 2025-12-16 12:09:04 +00:00
fix: resume application when library applets are closed
This commit is contained in:
parent
bf4c8952b0
commit
1a561852bb
@ -101,6 +101,22 @@ Result ILibraryAppletAccessor::PushInData(SharedPointer<IStorage> storage) {
|
||||
|
||||
Result ILibraryAppletAccessor::PopOutData(Out<SharedPointer<IStorage>> out_storage) {
|
||||
LOG_DEBUG(Service_AM, "called");
|
||||
// todo: move library applet fix to another function
|
||||
// since this function is only called for applets that give a result,
|
||||
// applets that don't (e.g. info applets in 1st party games) simply freeze
|
||||
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.");
|
||||
LOG_CRITICAL(Service_AM, "The emulator will freeze!");
|
||||
}
|
||||
R_RETURN(m_broker->GetOutData().Pop(out_storage.Get()));
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user