summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/time/system_clock_context_update_callback.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2024-01-25 20:19:01 +0100
committerGitHub <noreply@github.com>2024-01-25 20:19:01 +0100
commitd45561ace069024f47ed710d1165b607644d1ec3 (patch)
treea316f59c5a722dc15fe5c49b3641d9801c264970 /src/core/hle/service/time/system_clock_context_update_callback.cpp
parentMerge pull request #12781 from goldenx86/dozen (diff)
parentRework time service to fix time passing offline. (diff)
downloadyuzu-d45561ace069024f47ed710d1165b607644d1ec3.tar
yuzu-d45561ace069024f47ed710d1165b607644d1ec3.tar.gz
yuzu-d45561ace069024f47ed710d1165b607644d1ec3.tar.bz2
yuzu-d45561ace069024f47ed710d1165b607644d1ec3.tar.lz
yuzu-d45561ace069024f47ed710d1165b607644d1ec3.tar.xz
yuzu-d45561ace069024f47ed710d1165b607644d1ec3.tar.zst
yuzu-d45561ace069024f47ed710d1165b607644d1ec3.zip
Diffstat (limited to 'src/core/hle/service/time/system_clock_context_update_callback.cpp')
-rw-r--r--src/core/hle/service/time/system_clock_context_update_callback.cpp54
1 files changed, 0 insertions, 54 deletions
diff --git a/src/core/hle/service/time/system_clock_context_update_callback.cpp b/src/core/hle/service/time/system_clock_context_update_callback.cpp
deleted file mode 100644
index cafc04ee7..000000000
--- a/src/core/hle/service/time/system_clock_context_update_callback.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
-// SPDX-License-Identifier: GPL-2.0-or-later
-
-#include "core/hle/kernel/k_event.h"
-#include "core/hle/service/time/errors.h"
-#include "core/hle/service/time/system_clock_context_update_callback.h"
-
-namespace Service::Time::Clock {
-
-SystemClockContextUpdateCallback::SystemClockContextUpdateCallback() = default;
-SystemClockContextUpdateCallback::~SystemClockContextUpdateCallback() = default;
-
-bool SystemClockContextUpdateCallback::NeedUpdate(const SystemClockContext& value) const {
- if (has_context) {
- return context.offset != value.offset ||
- context.steady_time_point.clock_source_id != value.steady_time_point.clock_source_id;
- }
-
- return true;
-}
-
-void SystemClockContextUpdateCallback::RegisterOperationEvent(
- std::shared_ptr<Kernel::KEvent>&& event) {
- operation_event_list.emplace_back(std::move(event));
-}
-
-void SystemClockContextUpdateCallback::BroadcastOperationEvent() {
- for (const auto& event : operation_event_list) {
- event->Signal();
- }
-}
-
-Result SystemClockContextUpdateCallback::Update(const SystemClockContext& value) {
- Result result{ResultSuccess};
-
- if (NeedUpdate(value)) {
- context = value;
- has_context = true;
-
- result = Update();
-
- if (result == ResultSuccess) {
- BroadcastOperationEvent();
- }
- }
-
- return result;
-}
-
-Result SystemClockContextUpdateCallback::Update() {
- return ResultSuccess;
-}
-
-} // namespace Service::Time::Clock