1
0
Fork 0
forked from suyu/suyu

Compare commits

...

1 commit

Author SHA1 Message Date
41ebc0b06a
fix: retrack application when guest applet is closed 2024-03-24 19:53:45 -04:00
3 changed files with 14 additions and 0 deletions

View file

@ -1,4 +1,5 @@
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include "common/settings.h"
@ -335,4 +336,8 @@ void AppletManager::SetWindowSystem(WindowSystem* window_system) {
applet->process->Run();
}
void AppletManager::ReTrackApplication(std::shared_ptr<Applet> applet) {
m_window_system->RequestApplicationToGetForeground();
}
} // namespace Service::AM

View file

@ -1,4 +1,5 @@
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
@ -46,6 +47,7 @@ public:
public:
void SetWindowSystem(WindowSystem* window_system);
void ReTrackApplication(std::shared_ptr<Applet> applet);
private:
Core::System& m_system;

View file

@ -1,4 +1,5 @@
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include "core/hle/service/am/applet_data_broker.h"
@ -101,6 +102,12 @@ Result ILibraryAppletAccessor::PushInData(SharedPointer<IStorage> storage) {
Result ILibraryAppletAccessor::PopOutData(Out<SharedPointer<IStorage>> out_storage) {
LOG_DEBUG(Service_AM, "called");
if(!m_applet->caller_applet.expired()) {
LOG_DEBUG(Service_AM, "resuming caller");
system.GetAppletManager().ReTrackApplication(m_applet->caller_applet.lock());
} else {
LOG_CRITICAL(Service_AM, "Failed to track application. The emulator will freeze!");
}
R_RETURN(m_broker->GetOutData().Pop(out_storage.Get()));
}