mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-07-01 11:25:21 +02:00
[acc, ldn] Implement CreateClientProcessMonitor and stub LoadIdTokenCache changes (#2810)
- IManagerForApplication/SystemService: from 19.0.0+ LoadIdTokenCache (3) is now LoadIdTokenCacheDeprecated (3) - IManagerForApplication/SystemService: LoadIdTokenCache (4) stubbed - Implement CreateClientProcessMonitor to ldn:s and ldn:u - Create new client_process_monitor.cpp/.h files - Change non-domain (C) functions into domain (D) functions to fix crashes Thanks to SwitchBrew documentation, fixes 'Pokemon: Legends Z-A' LDN issues. Co-authored-by: JPikachu <jpikachu.eden@gmail.com> Co-authored-by: unknown <sahyno1996@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2810 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev> Co-authored-by: JPikachu <jpikachu@eden-emu.dev> Co-committed-by: JPikachu <jpikachu@eden-emu.dev>
This commit is contained in:
parent
cd4bcb91cc
commit
b5d54b8df7
7 changed files with 127 additions and 32 deletions
27
src/core/hle/service/ldn/client_process_monitor.cpp
Normal file
27
src/core/hle/service/ldn/client_process_monitor.cpp
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#include "core/hle/service/cmif_serialization.h"
|
||||
#include "core/hle/service/ldn/ldn_results.h"
|
||||
#include "core/hle/service/ldn/client_process_monitor.h"
|
||||
#include "core/hle/service/ipc_helpers.h"
|
||||
|
||||
namespace Service::LDN {
|
||||
|
||||
IClientProcessMonitor::IClientProcessMonitor(Core::System& system_)
|
||||
: ServiceFramework{system_, "IClientProcessMonitor"} {
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, D<&IClientProcessMonitor::RegisterClient>, "RegisterClient"},
|
||||
};
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
IClientProcessMonitor::~IClientProcessMonitor() = default;
|
||||
|
||||
Result IClientProcessMonitor::RegisterClient() {
|
||||
LOG_WARNING(Service_LDN, "(STUBBED) called");
|
||||
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
} // namespace Service::LDN
|
||||
25
src/core/hle/service/ldn/client_process_monitor.h
Normal file
25
src/core/hle/service/ldn/client_process_monitor.h
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/service/cmif_types.h"
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
}
|
||||
|
||||
namespace Service::LDN {
|
||||
|
||||
class IClientProcessMonitor final
|
||||
: public ServiceFramework<IClientProcessMonitor> {
|
||||
public:
|
||||
explicit IClientProcessMonitor(Core::System& system_);
|
||||
~IClientProcessMonitor() override;
|
||||
|
||||
private:
|
||||
Result RegisterClient();
|
||||
};
|
||||
|
||||
} // namespace Service::LDN
|
||||
|
|
@ -1,9 +1,13 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "core/core.h"
|
||||
#include "core/hle/service/cmif_serialization.h"
|
||||
#include "core/hle/service/ldn/ldn.h"
|
||||
#include "core/hle/service/ldn/client_process_monitor.h"
|
||||
#include "core/hle/service/ldn/monitor_service.h"
|
||||
#include "core/hle/service/ldn/sf_monitor_service.h"
|
||||
#include "core/hle/service/ldn/sf_service.h"
|
||||
|
|
@ -40,7 +44,7 @@ public:
|
|||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, C<&ISystemServiceCreator::CreateSystemLocalCommunicationService>, "CreateSystemLocalCommunicationService"},
|
||||
{1, nullptr, "CreateClientProcessMonitor"} // 18.0.0+
|
||||
{1, C<&ISystemServiceCreator::CreateClientProcessMonitor>, "CreateClientProcessMonitor"} // 18.0.0+
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
|
|
@ -55,6 +59,14 @@ private:
|
|||
*out_interface = std::make_shared<ISystemLocalCommunicationService>(system);
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result CreateClientProcessMonitor(
|
||||
OutInterface<IClientProcessMonitor> out_interface) {
|
||||
LOG_DEBUG(Service_LDN, "called");
|
||||
|
||||
*out_interface = std::make_shared<IClientProcessMonitor>(system);
|
||||
R_SUCCEED();
|
||||
}
|
||||
};
|
||||
|
||||
class IUserServiceCreator final : public ServiceFramework<IUserServiceCreator> {
|
||||
|
|
@ -62,8 +74,8 @@ public:
|
|||
explicit IUserServiceCreator(Core::System& system_) : ServiceFramework{system_, "ldn:u"} {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, C<&IUserServiceCreator::CreateUserLocalCommunicationService>, "CreateUserLocalCommunicationService"},
|
||||
{1, nullptr, "CreateClientProcessMonitor"} // 18.0.0+
|
||||
{0, D<&IUserServiceCreator::CreateUserLocalCommunicationService>, "CreateUserLocalCommunicationService"},
|
||||
{1, D<&IUserServiceCreator::CreateClientProcessMonitor>, "CreateClientProcessMonitor"} // 18.0.0+
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
|
|
@ -78,6 +90,14 @@ private:
|
|||
*out_interface = std::make_shared<IUserLocalCommunicationService>(system);
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result CreateClientProcessMonitor(
|
||||
OutInterface<IClientProcessMonitor> out_interface) {
|
||||
LOG_DEBUG(Service_LDN, "called");
|
||||
|
||||
*out_interface = std::make_shared<IClientProcessMonitor>(system);
|
||||
R_SUCCEED();
|
||||
}
|
||||
};
|
||||
|
||||
class ISfServiceCreator final : public ServiceFramework<ISfServiceCreator> {
|
||||
|
|
|
|||
|
|
@ -27,35 +27,35 @@ IUserLocalCommunicationService::IUserLocalCommunicationService(Core::System& sys
|
|||
lan_discovery{} {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, C<&IUserLocalCommunicationService::GetState>, "GetState"},
|
||||
{1, C<&IUserLocalCommunicationService::GetNetworkInfo>, "GetNetworkInfo"},
|
||||
{2, C<&IUserLocalCommunicationService::GetIpv4Address>, "GetIpv4Address"},
|
||||
{3, C<&IUserLocalCommunicationService::GetDisconnectReason>, "GetDisconnectReason"},
|
||||
{4, C<&IUserLocalCommunicationService::GetSecurityParameter>, "GetSecurityParameter"},
|
||||
{5, C<&IUserLocalCommunicationService::GetNetworkConfig>, "GetNetworkConfig"},
|
||||
{100, C<&IUserLocalCommunicationService::AttachStateChangeEvent>, "AttachStateChangeEvent"},
|
||||
{101, C<&IUserLocalCommunicationService::GetNetworkInfoLatestUpdate>, "GetNetworkInfoLatestUpdate"},
|
||||
{102, C<&IUserLocalCommunicationService::Scan>, "Scan"},
|
||||
{103, C<&IUserLocalCommunicationService::ScanPrivate>, "ScanPrivate"},
|
||||
{104, C<&IUserLocalCommunicationService::SetWirelessControllerRestriction>, "SetWirelessControllerRestriction"},
|
||||
{200, C<&IUserLocalCommunicationService::OpenAccessPoint>, "OpenAccessPoint"},
|
||||
{201, C<&IUserLocalCommunicationService::CloseAccessPoint>, "CloseAccessPoint"},
|
||||
{202, C<&IUserLocalCommunicationService::CreateNetwork>, "CreateNetwork"},
|
||||
{203, C<&IUserLocalCommunicationService::CreateNetworkPrivate>, "CreateNetworkPrivate"},
|
||||
{204, C<&IUserLocalCommunicationService::DestroyNetwork>, "DestroyNetwork"},
|
||||
{0, D<&IUserLocalCommunicationService::GetState>, "GetState"},
|
||||
{1, D<&IUserLocalCommunicationService::GetNetworkInfo>, "GetNetworkInfo"},
|
||||
{2, D<&IUserLocalCommunicationService::GetIpv4Address>, "GetIpv4Address"},
|
||||
{3, D<&IUserLocalCommunicationService::GetDisconnectReason>, "GetDisconnectReason"},
|
||||
{4, D<&IUserLocalCommunicationService::GetSecurityParameter>, "GetSecurityParameter"},
|
||||
{5, D<&IUserLocalCommunicationService::GetNetworkConfig>, "GetNetworkConfig"},
|
||||
{100, D<&IUserLocalCommunicationService::AttachStateChangeEvent>, "AttachStateChangeEvent"},
|
||||
{101, D<&IUserLocalCommunicationService::GetNetworkInfoLatestUpdate>, "GetNetworkInfoLatestUpdate"},
|
||||
{102, D<&IUserLocalCommunicationService::Scan>, "Scan"},
|
||||
{103, D<&IUserLocalCommunicationService::ScanPrivate>, "ScanPrivate"},
|
||||
{104, D<&IUserLocalCommunicationService::SetWirelessControllerRestriction>, "SetWirelessControllerRestriction"},
|
||||
{200, D<&IUserLocalCommunicationService::OpenAccessPoint>, "OpenAccessPoint"},
|
||||
{201, D<&IUserLocalCommunicationService::CloseAccessPoint>, "CloseAccessPoint"},
|
||||
{202, D<&IUserLocalCommunicationService::CreateNetwork>, "CreateNetwork"},
|
||||
{203, D<&IUserLocalCommunicationService::CreateNetworkPrivate>, "CreateNetworkPrivate"},
|
||||
{204, D<&IUserLocalCommunicationService::DestroyNetwork>, "DestroyNetwork"},
|
||||
{205, nullptr, "Reject"},
|
||||
{206, C<&IUserLocalCommunicationService::SetAdvertiseData>, "SetAdvertiseData"},
|
||||
{207, C<&IUserLocalCommunicationService::SetStationAcceptPolicy>, "SetStationAcceptPolicy"},
|
||||
{208, C<&IUserLocalCommunicationService::AddAcceptFilterEntry>, "AddAcceptFilterEntry"},
|
||||
{206, D<&IUserLocalCommunicationService::SetAdvertiseData>, "SetAdvertiseData"},
|
||||
{207, D<&IUserLocalCommunicationService::SetStationAcceptPolicy>, "SetStationAcceptPolicy"},
|
||||
{208, D<&IUserLocalCommunicationService::AddAcceptFilterEntry>, "AddAcceptFilterEntry"},
|
||||
{209, nullptr, "ClearAcceptFilter"},
|
||||
{300, C<&IUserLocalCommunicationService::OpenStation>, "OpenStation"},
|
||||
{301, C<&IUserLocalCommunicationService::CloseStation>, "CloseStation"},
|
||||
{302, C<&IUserLocalCommunicationService::Connect>, "Connect"},
|
||||
{300, D<&IUserLocalCommunicationService::OpenStation>, "OpenStation"},
|
||||
{301, D<&IUserLocalCommunicationService::CloseStation>, "CloseStation"},
|
||||
{302, D<&IUserLocalCommunicationService::Connect>, "Connect"},
|
||||
{303, nullptr, "ConnectPrivate"},
|
||||
{304, C<&IUserLocalCommunicationService::Disconnect>, "Disconnect"},
|
||||
{400, C<&IUserLocalCommunicationService::Initialize>, "Initialize"},
|
||||
{401, C<&IUserLocalCommunicationService::Finalize>, "Finalize"},
|
||||
{402, C<&IUserLocalCommunicationService::Initialize2>, "Initialize2"},
|
||||
{304, D<&IUserLocalCommunicationService::Disconnect>, "Disconnect"},
|
||||
{400, D<&IUserLocalCommunicationService::Initialize>, "Initialize"},
|
||||
{401, D<&IUserLocalCommunicationService::Finalize>, "Finalize"},
|
||||
{402, D<&IUserLocalCommunicationService::Initialize2>, "Initialize2"},
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue