cecd: Stub GetCecInfoEventHandleSys (#7278)

This allows usage of the LLE news sysmodule.
This commit is contained in:
Daniel López Guimaraes 2023-12-23 04:52:27 +01:00 committed by GitHub
parent 60a280af24
commit b6b98af105
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 1 deletions

View file

@ -37,6 +37,7 @@ template <class Archive>
void Module::serialize(Archive& ar, const unsigned int) { void Module::serialize(Archive& ar, const unsigned int) {
ar& cecd_system_save_data_archive; ar& cecd_system_save_data_archive;
ar& cecinfo_event; ar& cecinfo_event;
ar& cecinfosys_event;
ar& change_state_event; ar& change_state_event;
} }
SERIALIZE_IMPL(Module) SERIALIZE_IMPL(Module)
@ -836,6 +837,17 @@ void Module::Interface::OpenAndRead(Kernel::HLERequestContext& ctx) {
open_mode.create.Value(), open_mode.check.Value()); open_mode.create.Value(), open_mode.check.Value());
} }
void Module::Interface::GetCecInfoEventHandleSys(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx);
rp.PopPID();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
rb.Push(RESULT_SUCCESS);
rb.PushCopyObjects(cecd->cecinfosys_event);
LOG_WARNING(Service_CECD, "(STUBBED) called");
}
std::string Module::EncodeBase64(std::span<const u8> in) const { std::string Module::EncodeBase64(std::span<const u8> in) const {
using namespace CryptoPP; using namespace CryptoPP;
using Name::EncodingLookupArray; using Name::EncodingLookupArray;
@ -1379,6 +1391,8 @@ Module::Interface::Interface(std::shared_ptr<Module> cecd, const char* name, u32
Module::Module(Core::System& system) : system(system) { Module::Module(Core::System& system) : system(system) {
using namespace Kernel; using namespace Kernel;
cecinfo_event = system.Kernel().CreateEvent(Kernel::ResetType::OneShot, "CECD::cecinfo_event"); cecinfo_event = system.Kernel().CreateEvent(Kernel::ResetType::OneShot, "CECD::cecinfo_event");
cecinfosys_event =
system.Kernel().CreateEvent(Kernel::ResetType::OneShot, "CECD::cecinfosys_event");
change_state_event = change_state_event =
system.Kernel().CreateEvent(Kernel::ResetType::OneShot, "CECD::change_state_event"); system.Kernel().CreateEvent(Kernel::ResetType::OneShot, "CECD::change_state_event");

View file

@ -625,6 +625,7 @@ private:
std::unique_ptr<FileSys::ArchiveBackend> cecd_system_save_data_archive; std::unique_ptr<FileSys::ArchiveBackend> cecd_system_save_data_archive;
std::shared_ptr<Kernel::Event> cecinfo_event; std::shared_ptr<Kernel::Event> cecinfo_event;
std::shared_ptr<Kernel::Event> cecinfosys_event;
std::shared_ptr<Kernel::Event> change_state_event; std::shared_ptr<Kernel::Event> change_state_event;
Core::System& system; Core::System& system;

View file

@ -35,7 +35,7 @@ CECD_S::CECD_S(std::shared_ptr<Module> cecd)
{0x001E, nullptr, "GetEventLog"}, {0x001E, nullptr, "GetEventLog"},
{0x001F, nullptr, "GetEventLogStart"}, {0x001F, nullptr, "GetEventLogStart"},
// cecd:s commands // cecd:s commands
{0x0402, nullptr, "GetCecInfoEventHandleSys"}, {0x0402, &CECD_S::GetCecInfoEventHandleSys, "GetCecInfoEventHandleSys"},
// clang-format on // clang-format on
}; };