From dafcd228134c136c32fe5fd665954b3b7c2eef73 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Sat, 24 Apr 2021 20:10:00 +0200 Subject: [PATCH] early-access version 1630 --- README.md | 2 +- src/core/CMakeLists.txt | 2 ++ src/core/hle/service/am/am.cpp | 10 +++++++++- src/core/hle/service/am/am.h | 1 + src/core/hle/service/glue/ectx.cpp | 22 ++++++++++++++++++++++ src/core/hle/service/glue/ectx.h | 21 +++++++++++++++++++++ src/core/hle/service/glue/glue.cpp | 4 ++++ 7 files changed, 60 insertions(+), 2 deletions(-) create mode 100755 src/core/hle/service/glue/ectx.cpp create mode 100755 src/core/hle/service/glue/ectx.h diff --git a/README.md b/README.md index 572cacbcf..539489609 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 1628. +This is the source code for early-access 1630. ## Legal Notice diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 532e418b0..04cf3f5b9 100755 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -377,6 +377,8 @@ add_library(core STATIC hle/service/glue/arp.h hle/service/glue/bgtc.cpp hle/service/glue/bgtc.h + hle/service/glue/ectx.cpp + hle/service/glue/ectx.h hle/service/glue/errors.h hle/service/glue/glue.cpp hle/service/glue/glue.h diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 4c8216b47..58c7f2930 100755 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -687,7 +687,7 @@ ICommonStateGetter::ICommonStateGetter(Core::System& system_, {501, nullptr, "SuppressDisablingSleepTemporarily"}, {502, nullptr, "IsSleepEnabled"}, {503, nullptr, "IsDisablingSleepSuppressed"}, - {900, nullptr, "SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled"}, + {900, &ICommonStateGetter::SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled, "SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled"}, }; // clang-format on @@ -817,6 +817,14 @@ void ICommonStateGetter::SetCpuBoostMode(Kernel::HLERequestContext& ctx) { apm_sys->SetCpuBoostMode(ctx); } +void ICommonStateGetter::SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled( + Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service_AM, "(STUBBED) called"); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(RESULT_SUCCESS); +} + IStorageImpl::~IStorageImpl() = default; class StorageDataImpl final : public IStorageImpl { diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h index 756434716..5d302e155 100755 --- a/src/core/hle/service/am/am.h +++ b/src/core/hle/service/am/am.h @@ -196,6 +196,7 @@ private: void EndVrModeEx(Kernel::HLERequestContext& ctx); void GetDefaultDisplayResolution(Kernel::HLERequestContext& ctx); void SetCpuBoostMode(Kernel::HLERequestContext& ctx); + void SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled(Kernel::HLERequestContext& ctx); std::shared_ptr msg_queue; bool vr_mode_state{}; diff --git a/src/core/hle/service/glue/ectx.cpp b/src/core/hle/service/glue/ectx.cpp new file mode 100755 index 000000000..249c6f003 --- /dev/null +++ b/src/core/hle/service/glue/ectx.cpp @@ -0,0 +1,22 @@ +// Copyright 2021 yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include "core/hle/service/glue/ectx.h" + +namespace Service::Glue { + +ECTX_AW::ECTX_AW(Core::System& system_) : ServiceFramework{system_, "ectx:aw"} { + // clang-format off + static const FunctionInfo functions[] = { + {0, nullptr, "CreateContextRegistrar"}, + {1, nullptr, "CommitContext"}, + }; + // clang-format on + + RegisterHandlers(functions); +} + +ECTX_AW::~ECTX_AW() = default; + +} // namespace Service::Glue diff --git a/src/core/hle/service/glue/ectx.h b/src/core/hle/service/glue/ectx.h new file mode 100755 index 000000000..b275e808a --- /dev/null +++ b/src/core/hle/service/glue/ectx.h @@ -0,0 +1,21 @@ +// Copyright 2021 yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include "core/hle/service/service.h" + +namespace Core { +class System; +} + +namespace Service::Glue { + +class ECTX_AW final : public ServiceFramework { +public: + explicit ECTX_AW(Core::System& system_); + ~ECTX_AW() override; +}; + +} // namespace Service::Glue diff --git a/src/core/hle/service/glue/glue.cpp b/src/core/hle/service/glue/glue.cpp index 4eafbe5fa..a08dc9758 100755 --- a/src/core/hle/service/glue/glue.cpp +++ b/src/core/hle/service/glue/glue.cpp @@ -6,6 +6,7 @@ #include "core/core.h" #include "core/hle/service/glue/arp.h" #include "core/hle/service/glue/bgtc.h" +#include "core/hle/service/glue/ectx.h" #include "core/hle/service/glue/glue.h" namespace Service::Glue { @@ -20,6 +21,9 @@ void InstallInterfaces(Core::System& system) { // BackGround Task Controller std::make_shared(system)->InstallAsService(system.ServiceManager()); std::make_shared(system)->InstallAsService(system.ServiceManager()); + + // Error Context + std::make_shared(system)->InstallAsService(system.ServiceManager()); } } // namespace Service::Glue