diff options
| author | PavelBARABANOV <pavelbarabanov94@gmail.com> | 2026-10-15 08:45:15 +0200 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2026-10-15 08:45:15 +0200 |
| commit | e255c20db4111485d228c10478bda63aabcfdde5 (patch) | |
| tree | 1f8c88981b60e9a4db4ed306742196b1c4b68116 /src/core/hle/service/psc/time/static.cpp | |
| parent | 14da4482a4668928bad43bb67ef12f96b9c9d972 (diff) | |
Revert "[hle] constexpr handler dispatch maps, introduce version gating (#4480)" (#4532)
This reverts commit 218c6705d950635bc18f8458d738a1996fb592b6.
- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md).
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.
-------------------
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4532
Reviewed-by: lizzie <lizzie@eden-emu.dev>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Diffstat (limited to 'src/core/hle/service/psc/time/static.cpp')
| -rw-r--r-- | src/core/hle/service/psc/time/static.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/core/hle/service/psc/time/static.cpp b/src/core/hle/service/psc/time/static.cpp index 2b2b6f1f04..28cff3b764 100644 --- a/src/core/hle/service/psc/time/static.cpp +++ b/src/core/hle/service/psc/time/static.cpp @@ -33,31 +33,6 @@ constexpr Result GetTimeFromTimePointAndContext(s64* out_time, SteadyClockTimePo } } // namespace -std::optional<ServiceFrameworkBase::FunctionInfoBase> StaticService::FindRequest(u32 key) { - static constexpr auto functions = CreateStaticMap( - FunctionInfo{0, D<&StaticService::GetStandardUserSystemClock>, "GetStandardUserSystemClock"}, - FunctionInfo{1, D<&StaticService::GetStandardNetworkSystemClock>, "GetStandardNetworkSystemClock"}, - FunctionInfo{2, D<&StaticService::GetStandardSteadyClock>, "GetStandardSteadyClock"}, - FunctionInfo{3, D<&StaticService::GetTimeZoneService>, "GetTimeZoneService"}, - FunctionInfo{4, D<&StaticService::GetStandardLocalSystemClock>, "GetStandardLocalSystemClock"}, - FunctionInfo{5, D<&StaticService::GetEphemeralNetworkSystemClock>, "GetEphemeralNetworkSystemClock"}, - FunctionInfo{20, D<&StaticService::GetSharedMemoryNativeHandle>, "GetSharedMemoryNativeHandle"}, - FunctionInfo{50, D<&StaticService::SetStandardSteadyClockInternalOffset>, "SetStandardSteadyClockInternalOffset"}, - FunctionInfo{51, D<&StaticService::GetStandardSteadyClockRtcValue>, "GetStandardSteadyClockRtcValue"}, - FunctionInfo{100, D<&StaticService::IsStandardUserSystemClockAutomaticCorrectionEnabled>, "IsStandardUserSystemClockAutomaticCorrectionEnabled"}, - FunctionInfo{101, D<&StaticService::SetStandardUserSystemClockAutomaticCorrectionEnabled>, "SetStandardUserSystemClockAutomaticCorrectionEnabled"}, - FunctionInfo{102, D<&StaticService::GetStandardUserSystemClockInitialYear>, "GetStandardUserSystemClockInitialYear"}, - FunctionInfo{200, D<&StaticService::IsStandardNetworkSystemClockAccuracySufficient>, "IsStandardNetworkSystemClockAccuracySufficient"}, - FunctionInfo{201, D<&StaticService::GetStandardUserSystemClockAutomaticCorrectionUpdatedTime>, "GetStandardUserSystemClockAutomaticCorrectionUpdatedTime"}, - FunctionInfo{300, D<&StaticService::CalculateMonotonicSystemClockBaseTimePoint>, "CalculateMonotonicSystemClockBaseTimePoint"}, - FunctionInfo{400, D<&StaticService::GetClockSnapshot>, "GetClockSnapshot"}, - FunctionInfo{401, D<&StaticService::GetClockSnapshotFromSystemClockContext>, "GetClockSnapshotFromSystemClockContext"}, - FunctionInfo{500, D<&StaticService::CalculateStandardUserSystemClockDifferenceByUser>, "CalculateStandardUserSystemClockDifferenceByUser"}, - FunctionInfo{501, D<&StaticService::CalculateSpanBetween>, "CalculateSpanBetween"} - ); - return HandlerTableGenerateWithFind(key, functions); -} - StaticService::StaticService(Core::System& system_, StaticServiceSetupInfo setup_info, std::shared_ptr<TimeManager> time, const char* name) : ServiceFramework{system_, name}, m_setup_info{setup_info}, m_time{time}, @@ -67,6 +42,31 @@ StaticService::StaticService(Core::System& system_, StaticServiceSetupInfo setup m_time_zone{m_time->m_time_zone}, m_ephemeral_network_clock{m_time->m_ephemeral_network_clock}, m_shared_memory{ m_time->m_shared_memory} { + // clang-format off + static const FunctionInfo functions[] = { + {0, D<&StaticService::GetStandardUserSystemClock>, "GetStandardUserSystemClock"}, + {1, D<&StaticService::GetStandardNetworkSystemClock>, "GetStandardNetworkSystemClock"}, + {2, D<&StaticService::GetStandardSteadyClock>, "GetStandardSteadyClock"}, + {3, D<&StaticService::GetTimeZoneService>, "GetTimeZoneService"}, + {4, D<&StaticService::GetStandardLocalSystemClock>, "GetStandardLocalSystemClock"}, + {5, D<&StaticService::GetEphemeralNetworkSystemClock>, "GetEphemeralNetworkSystemClock"}, + {20, D<&StaticService::GetSharedMemoryNativeHandle>, "GetSharedMemoryNativeHandle"}, + {50, D<&StaticService::SetStandardSteadyClockInternalOffset>, "SetStandardSteadyClockInternalOffset"}, + {51, D<&StaticService::GetStandardSteadyClockRtcValue>, "GetStandardSteadyClockRtcValue"}, + {100, D<&StaticService::IsStandardUserSystemClockAutomaticCorrectionEnabled>, "IsStandardUserSystemClockAutomaticCorrectionEnabled"}, + {101, D<&StaticService::SetStandardUserSystemClockAutomaticCorrectionEnabled>, "SetStandardUserSystemClockAutomaticCorrectionEnabled"}, + {102, D<&StaticService::GetStandardUserSystemClockInitialYear>, "GetStandardUserSystemClockInitialYear"}, + {200, D<&StaticService::IsStandardNetworkSystemClockAccuracySufficient>, "IsStandardNetworkSystemClockAccuracySufficient"}, + {201, D<&StaticService::GetStandardUserSystemClockAutomaticCorrectionUpdatedTime>, "GetStandardUserSystemClockAutomaticCorrectionUpdatedTime"}, + {300, D<&StaticService::CalculateMonotonicSystemClockBaseTimePoint>, "CalculateMonotonicSystemClockBaseTimePoint"}, + {400, D<&StaticService::GetClockSnapshot>, "GetClockSnapshot"}, + {401, D<&StaticService::GetClockSnapshotFromSystemClockContext>, "GetClockSnapshotFromSystemClockContext"}, + {500, D<&StaticService::CalculateStandardUserSystemClockDifferenceByUser>, "CalculateStandardUserSystemClockDifferenceByUser"}, + {501, D<&StaticService::CalculateSpanBetween>, "CalculateSpanBetween"}, + }; + // clang-format on + + RegisterHandlers(functions); } Result StaticService::GetStandardUserSystemClock(OutInterface<SystemClock> out_service) { |
