diff --git a/src/core/hle/service/caps/caps_manager.cpp b/src/core/hle/service/caps/caps_manager.cpp index af0b9b16ad..a2b40125b5 100644 --- a/src/core/hle/service/caps/caps_manager.cpp +++ b/src/core/hle/service/caps/caps_manager.cpp @@ -257,7 +257,7 @@ Result AlbumManager::SaveScreenShot(ApplicationAlbumEntry& out_entry, static_service->GetStandardUserSystemClock(&user_clock); s64 posix_time{}; - auto result = user_clock->GetCurrentTime(&posix_time); + auto result = user_clock->GetCurrentClockTime(&posix_time); if (result.IsError()) { return result; @@ -279,7 +279,7 @@ Result AlbumManager::SaveEditedScreenShot(ApplicationAlbumEntry& out_entry, static_service->GetStandardUserSystemClock(&user_clock); s64 posix_time{}; - auto result = user_clock->GetCurrentTime(&posix_time); + auto result = user_clock->GetCurrentClockTime(&posix_time); if (result.IsError()) { return result; diff --git a/src/core/hle/service/glue/notif.cpp b/src/core/hle/service/glue/notif.cpp index 87e4094dbe..5f72431159 100644 --- a/src/core/hle/service/glue/notif.cpp +++ b/src/core/hle/service/glue/notif.cpp @@ -232,7 +232,7 @@ INotificationServices::INotificationServices(Core::System& system_) {2020, nullptr, "IsAlarmSettingReady"}, {8000, nullptr, "RegisterAppletResourceUserId"}, {8010, nullptr, "UnregisterAppletResourceUserId"}, - {8999, nullptr, "GetCurrentTime"}, + {8999, nullptr, "GetCurrentClockTime"}, {9000, nullptr, "GetAlarmSettingNextNotificationTime"}, }; // clang-format on diff --git a/src/core/hle/service/glue/time/file_timestamp_worker.cpp b/src/core/hle/service/glue/time/file_timestamp_worker.cpp index 048ff174c9..fd83d7fcbd 100644 --- a/src/core/hle/service/glue/time/file_timestamp_worker.cpp +++ b/src/core/hle/service/glue/time/file_timestamp_worker.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -13,7 +16,7 @@ void FileTimestampWorker::SetFilesystemPosixTime() { Service::PSC::Time::CalendarTime calendar_time{}; Service::PSC::Time::CalendarAdditionalInfo additional_info{}; - if (m_initialized && m_system_clock->GetCurrentTime(&time) == ResultSuccess && + if (m_initialized && m_system_clock->GetCurrentClockTime(&time) == ResultSuccess && m_time_zone->ToCalendarTimeWithMyRule(&calendar_time, &additional_info, time) == ResultSuccess) { // TODO IFileSystemProxy::SetCurrentPosixTime diff --git a/src/core/hle/service/glue/time/manager.cpp b/src/core/hle/service/glue/time/manager.cpp index 0da790e1c8..ea0a77d1f4 100644 --- a/src/core/hle/service/glue/time/manager.cpp +++ b/src/core/hle/service/glue/time/manager.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project @@ -179,7 +179,7 @@ TimeManager::TimeManager(Core::System& system) m_file_timestamp_worker.m_initialized = true; s64 system_clock_time{}; - if (m_file_timestamp_worker.m_system_clock->GetCurrentTime(&system_clock_time) == + if (m_file_timestamp_worker.m_system_clock->GetCurrentClockTime(&system_clock_time) == ResultSuccess) { Service::PSC::Time::CalendarTime calendar_time{}; Service::PSC::Time::CalendarAdditionalInfo calendar_additional{}; diff --git a/src/core/hle/service/glue/time/worker.cpp b/src/core/hle/service/glue/time/worker.cpp index bde4b5d13c..6638efbc8d 100644 --- a/src/core/hle/service/glue/time/worker.cpp +++ b/src/core/hle/service/glue/time/worker.cpp @@ -201,7 +201,7 @@ void TimeWorker::ThreadFunc(std::stop_token stop_token) { m_set_sys->SetNetworkSystemClockContext(context); s64 time{}; - if (m_network_clock->GetCurrentTime(&time) != ResultSuccess) { + if (m_network_clock->GetCurrentClockTime(&time) != ResultSuccess) { break; } @@ -230,7 +230,7 @@ void TimeWorker::ThreadFunc(std::stop_token stop_token) { } s64 time{}; - res = m_ephemeral_clock->GetCurrentTime(&time); + res = m_ephemeral_clock->GetCurrentClockTime(&time); if (res != ResultSuccess) { break; } diff --git a/src/core/hle/service/psc/time/clocks/context_writers.cpp b/src/core/hle/service/psc/time/clocks/context_writers.cpp index a44486b438..85c226caf1 100644 --- a/src/core/hle/service/psc/time/clocks/context_writers.cpp +++ b/src/core/hle/service/psc/time/clocks/context_writers.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -45,7 +48,7 @@ NetworkSystemClockContextWriter::NetworkSystemClockContextWriter(Core::System& s Result NetworkSystemClockContextWriter::Write(const SystemClockContext& context) { s64 time{}; - [[maybe_unused]] auto res = m_system_clock.GetCurrentTime(&time); + [[maybe_unused]] auto res = m_system_clock.GetCurrentClockTime(&time); if (m_in_use) { R_SUCCEED_IF(context == m_context); diff --git a/src/core/hle/service/psc/time/clocks/system_clock_core.cpp b/src/core/hle/service/psc/time/clocks/system_clock_core.cpp index 2b7466831d..7df605c965 100644 --- a/src/core/hle/service/psc/time/clocks/system_clock_core.cpp +++ b/src/core/hle/service/psc/time/clocks/system_clock_core.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -20,7 +23,7 @@ bool SystemClockCore::CheckClockSourceMatches() { return context.steady_time_point.IdMatches(time_point); } -Result SystemClockCore::GetCurrentTime(s64* out_time) const { +Result SystemClockCore::GetCurrentClockTime(s64* out_time) const { R_UNLESS(out_time != nullptr, ResultInvalidArgument); SystemClockContext context{}; diff --git a/src/core/hle/service/psc/time/clocks/system_clock_core.h b/src/core/hle/service/psc/time/clocks/system_clock_core.h index 0b928432fb..552b37bb5e 100644 --- a/src/core/hle/service/psc/time/clocks/system_clock_core.h +++ b/src/core/hle/service/psc/time/clocks/system_clock_core.h @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -33,7 +36,7 @@ public: bool CheckClockSourceMatches(); - Result GetCurrentTime(s64* out_time) const; + Result GetCurrentClockTime(s64* out_time) const; Result SetCurrentTime(s64 time); Result GetCurrentTimePoint(SteadyClockTimePoint& out_time_point) { diff --git a/src/core/hle/service/psc/time/system_clock.cpp b/src/core/hle/service/psc/time/system_clock.cpp index 9f841d8e04..cdddbf7957 100644 --- a/src/core/hle/service/psc/time/system_clock.cpp +++ b/src/core/hle/service/psc/time/system_clock.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -15,7 +18,7 @@ SystemClock::SystemClock(Core::System& system_, SystemClockCore& clock_core, boo can_write_uninitialized_clock} { // clang-format off static const FunctionInfo functions[] = { - {0, D<&SystemClock::GetCurrentTime>, "GetCurrentTime"}, + {0, D<&SystemClock::GetCurrentClockTime>, "GetCurrentClockTime"}, {1, D<&SystemClock::SetCurrentTime>, "SetCurrentTime"}, {2, D<&SystemClock::GetSystemClockContext>, "GetSystemClockContext"}, {3, D<&SystemClock::SetSystemClockContext>, "SetSystemClockContext"}, @@ -25,7 +28,7 @@ SystemClock::SystemClock(Core::System& system_, SystemClockCore& clock_core, boo RegisterHandlers(functions); } -Result SystemClock::GetCurrentTime(Out out_time) { +Result SystemClock::GetCurrentClockTime(Out out_time) { SCOPE_EXIT { LOG_DEBUG(Service_Time, "called. out_time={}", *out_time); }; @@ -33,7 +36,7 @@ Result SystemClock::GetCurrentTime(Out out_time) { R_UNLESS(m_can_write_uninitialized_clock || m_clock_core.IsInitialized(), ResultClockUninitialized); - R_RETURN(m_clock_core.GetCurrentTime(out_time.Get())); + R_RETURN(m_clock_core.GetCurrentClockTime(out_time.Get())); } Result SystemClock::SetCurrentTime(s64 time) { diff --git a/src/core/hle/service/psc/time/system_clock.h b/src/core/hle/service/psc/time/system_clock.h index 3c11fb2f81..be23366964 100644 --- a/src/core/hle/service/psc/time/system_clock.h +++ b/src/core/hle/service/psc/time/system_clock.h @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -23,7 +26,7 @@ public: ~SystemClock() override = default; - Result GetCurrentTime(Out out_time); + Result GetCurrentClockTime(Out out_time); Result SetCurrentTime(s64 time); Result GetSystemClockContext(Out out_context); Result SetSystemClockContext(const SystemClockContext& context);