[acc, ldn] Impliment CreateClientProcessMonitor and stub LoadIdTokenCache changes

- Impliment CreateClientProcessMonitor to ldn:s and ldn:u
- IManagerForApplication/SystemService: from 19.0.0+ LoadIdTokenCache (3) is now LoadIdTokenCacheDeprecated (3)
- IManagerForApplication/SystemService: LoadIdTokenCache (4) stubbed

Thanks to SwitchBrew documentation, aims to fix 'Pokemon: Legends Z-A' LDN issues.
This commit is contained in:
JPikachu 2025-10-21 20:01:14 +01:00
parent e33d426ac4
commit 7d0490eb63
2 changed files with 34 additions and 4 deletions

View file

@ -84,7 +84,8 @@ public:
{0, D<&IManagerForSystemService::CheckAvailability>, "CheckAvailability"}, {0, D<&IManagerForSystemService::CheckAvailability>, "CheckAvailability"},
{1, D<&IManagerForSystemService::GetAccountId>, "GetAccountId"}, {1, D<&IManagerForSystemService::GetAccountId>, "GetAccountId"},
{2, nullptr, "EnsureIdTokenCacheAsync"}, {2, nullptr, "EnsureIdTokenCacheAsync"},
{3, nullptr, "LoadIdTokenCache"}, {3, D<&IManagerForSystemService::LoadIdTokenCacheDeprecated>, "LoadIdTokenCacheDeprecated"}, // 19.0.0+
{4, D<&IManagerForSystemService::LoadIdTokenCache>, "LoadIdTokenCache"}, // 19.0.0+
{100, nullptr, "SetSystemProgramIdentification"}, {100, nullptr, "SetSystemProgramIdentification"},
{101, nullptr, "RefreshNotificationTokenAsync"}, // 7.0.0+ {101, nullptr, "RefreshNotificationTokenAsync"}, // 7.0.0+
{110, nullptr, "GetServiceEntryRequirementCache"}, // 4.0.0+ {110, nullptr, "GetServiceEntryRequirementCache"}, // 4.0.0+
@ -126,6 +127,16 @@ private:
R_SUCCEED(); R_SUCCEED();
} }
Result LoadIdTokenCacheDeprecated() {
LOG_WARNING(Service_ACC, "(STUBBED) called");
R_SUCCEED();
}
Result LoadIdTokenCache() {
LOG_WARNING(Service_ACC, "(STUBBED) called");
R_SUCCEED();
}
Result GetNetworkServiceLicenseCacheEx() { Result GetNetworkServiceLicenseCacheEx() {
LOG_DEBUG(Service_ACC, "(STUBBED) called."); LOG_DEBUG(Service_ACC, "(STUBBED) called.");
@ -647,7 +658,7 @@ public:
{0, &IManagerForApplication::CheckAvailability, "CheckAvailability"}, {0, &IManagerForApplication::CheckAvailability, "CheckAvailability"},
{1, &IManagerForApplication::GetAccountId, "GetAccountId"}, {1, &IManagerForApplication::GetAccountId, "GetAccountId"},
{2, &IManagerForApplication::EnsureIdTokenCacheAsync, "EnsureIdTokenCacheAsync"}, {2, &IManagerForApplication::EnsureIdTokenCacheAsync, "EnsureIdTokenCacheAsync"},
{3, &IManagerForApplication::LoadIdTokenCacheDeprecated, "LoadIdTokenCache"}, {3, &IManagerForApplication::LoadIdTokenCacheDeprecated, "LoadIdTokenCacheDeprecated"},
{4, &IManagerForApplication::LoadIdTokenCache, "LoadIdTokenCache"}, {4, &IManagerForApplication::LoadIdTokenCache, "LoadIdTokenCache"},
{130, &IManagerForApplication::GetNintendoAccountUserResourceCacheForApplication, "GetNintendoAccountUserResourceCacheForApplication"}, {130, &IManagerForApplication::GetNintendoAccountUserResourceCacheForApplication, "GetNintendoAccountUserResourceCacheForApplication"},
{136, &IManagerForApplication::GetNintendoAccountUserResourceCacheForApplication, "GetNintendoAccountUserResourceCache"}, // 19.0.0+ {136, &IManagerForApplication::GetNintendoAccountUserResourceCacheForApplication, "GetNintendoAccountUserResourceCache"}, // 19.0.0+

View file

@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
@ -40,7 +43,7 @@ public:
// clang-format off // clang-format off
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, C<&ISystemServiceCreator::CreateSystemLocalCommunicationService>, "CreateSystemLocalCommunicationService"}, {0, C<&ISystemServiceCreator::CreateSystemLocalCommunicationService>, "CreateSystemLocalCommunicationService"},
{1, nullptr, "CreateClientProcessMonitor"} // 18.0.0+ {1, C<&ISystemServiceCreator::CreateClientProcessMonitor>, "CreateClientProcessMonitor"} // 18.0.0+
}; };
// clang-format on // clang-format on
@ -55,6 +58,14 @@ private:
*out_interface = std::make_shared<ISystemLocalCommunicationService>(system); *out_interface = std::make_shared<ISystemLocalCommunicationService>(system);
R_SUCCEED(); 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> { class IUserServiceCreator final : public ServiceFramework<IUserServiceCreator> {
@ -63,7 +74,7 @@ public:
// clang-format off // clang-format off
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, C<&IUserServiceCreator::CreateUserLocalCommunicationService>, "CreateUserLocalCommunicationService"}, {0, C<&IUserServiceCreator::CreateUserLocalCommunicationService>, "CreateUserLocalCommunicationService"},
{1, nullptr, "CreateClientProcessMonitor"} // 18.0.0+ {1, C<&IUserServiceCreator::CreateClientProcessMonitor>, "CreateClientProcessMonitor"} // 18.0.0+
}; };
// clang-format on // clang-format on
@ -78,6 +89,14 @@ private:
*out_interface = std::make_shared<IUserLocalCommunicationService>(system); *out_interface = std::make_shared<IUserLocalCommunicationService>(system);
R_SUCCEED(); 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> { class ISfServiceCreator final : public ServiceFramework<ISfServiceCreator> {