mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-25 20:55:51 +01:00
am: record library applet termination result
This commit is contained in:
parent
59c5a86b8a
commit
ab3b3b691a
@ -9,6 +9,7 @@ namespace Service::AM {
|
||||
|
||||
constexpr Result ResultNoDataInChannel{ErrorModule::AM, 2};
|
||||
constexpr Result ResultNoMessages{ErrorModule::AM, 3};
|
||||
constexpr Result ResultLibraryAppletTerminated{ErrorModule::AM, 22};
|
||||
constexpr Result ResultInvalidOffset{ErrorModule::AM, 503};
|
||||
constexpr Result ResultInvalidStorageType{ErrorModule::AM, 511};
|
||||
constexpr Result ResultFatalSectionCountImbalance{ErrorModule::AM, 512};
|
||||
|
@ -83,7 +83,8 @@ Result IApplicationAccessor::Terminate() {
|
||||
|
||||
Result IApplicationAccessor::GetResult() {
|
||||
LOG_INFO(Service_AM, "called");
|
||||
R_SUCCEED();
|
||||
std::scoped_lock lk{m_applet->lock};
|
||||
R_RETURN(m_applet->terminate_result);
|
||||
}
|
||||
|
||||
Result IApplicationAccessor::GetAppletStateChangedEvent(
|
||||
|
@ -58,10 +58,10 @@ Result ILibraryAppletAccessor::IsCompleted(Out<bool> out_is_completed) {
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result ILibraryAppletAccessor::GetResult(Out<Result> out_result) {
|
||||
Result ILibraryAppletAccessor::GetResult() {
|
||||
LOG_DEBUG(Service_AM, "called");
|
||||
*out_result = m_applet->terminate_result;
|
||||
R_SUCCEED();
|
||||
std::scoped_lock lk{m_applet->lock};
|
||||
R_RETURN(m_applet->terminate_result);
|
||||
}
|
||||
|
||||
Result ILibraryAppletAccessor::PresetLibraryAppletGpuTimeSliceZero() {
|
||||
|
@ -21,7 +21,7 @@ public:
|
||||
private:
|
||||
Result GetAppletStateChangedEvent(OutCopyHandle<Kernel::KReadableEvent> out_event);
|
||||
Result IsCompleted(Out<bool> out_is_completed);
|
||||
Result GetResult(Out<Result> out_result);
|
||||
Result GetResult();
|
||||
Result PresetLibraryAppletGpuTimeSliceZero();
|
||||
Result Start();
|
||||
Result RequestExit();
|
||||
|
@ -2,6 +2,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "core/core.h"
|
||||
#include "core/hle/service/am/am_results.h"
|
||||
#include "core/hle/service/am/applet.h"
|
||||
#include "core/hle/service/am/applet_manager.h"
|
||||
#include "core/hle/service/am/event_observer.h"
|
||||
@ -250,7 +251,9 @@ void WindowSystem::TerminateChildAppletsLocked(Applet* applet) {
|
||||
|
||||
applet->lock.unlock();
|
||||
for (const auto& child_applet : child_applets) {
|
||||
std::scoped_lock lk{child_applet->lock};
|
||||
child_applet->process->Terminate();
|
||||
child_applet->terminate_result = AM::ResultLibraryAppletTerminated;
|
||||
}
|
||||
applet->lock.lock();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user