diff options
author | bunnei <bunneidev@gmail.com> | 2021-02-06 08:00:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-06 08:00:43 +0100 |
commit | 1498a7c9a84037d7c78ff21b3bc996622269db43 (patch) | |
tree | 0fb418f721db6e307fb7105cc57fe3a2eec7d0bf /src/core/hle/service/time | |
parent | Merge pull request #5875 from lioncash/identifier (diff) | |
parent | hle: kernel: Drop R_UNLESS_NOLOG in favor of expanded if-statement. (diff) | |
download | yuzu-1498a7c9a84037d7c78ff21b3bc996622269db43.tar yuzu-1498a7c9a84037d7c78ff21b3bc996622269db43.tar.gz yuzu-1498a7c9a84037d7c78ff21b3bc996622269db43.tar.bz2 yuzu-1498a7c9a84037d7c78ff21b3bc996622269db43.tar.lz yuzu-1498a7c9a84037d7c78ff21b3bc996622269db43.tar.xz yuzu-1498a7c9a84037d7c78ff21b3bc996622269db43.tar.zst yuzu-1498a7c9a84037d7c78ff21b3bc996622269db43.zip |
Diffstat (limited to 'src/core/hle/service/time')
4 files changed, 15 insertions, 10 deletions
diff --git a/src/core/hle/service/time/standard_user_system_clock_core.cpp b/src/core/hle/service/time/standard_user_system_clock_core.cpp index 8af17091c..b9faa474e 100644 --- a/src/core/hle/service/time/standard_user_system_clock_core.cpp +++ b/src/core/hle/service/time/standard_user_system_clock_core.cpp @@ -4,7 +4,7 @@ #include "common/assert.h" #include "core/core.h" -#include "core/hle/kernel/writable_event.h" +#include "core/hle/kernel/k_event.h" #include "core/hle/service/time/standard_local_system_clock_core.h" #include "core/hle/service/time/standard_network_system_clock_core.h" #include "core/hle/service/time/standard_user_system_clock_core.h" @@ -18,8 +18,10 @@ StandardUserSystemClockCore::StandardUserSystemClockCore( local_system_clock_core{local_system_clock_core}, network_system_clock_core{network_system_clock_core}, auto_correction_enabled{}, auto_correction_time{SteadyClockTimePoint::GetRandom()}, - auto_correction_event{Kernel::WritableEvent::CreateEventPair( - system.Kernel(), "StandardUserSystemClockCore:AutoCorrectionEvent")} {} + auto_correction_event{Kernel::KEvent::Create( + system.Kernel(), "StandardUserSystemClockCore:AutoCorrectionEvent")} { + auto_correction_event->Initialize(); +} ResultCode StandardUserSystemClockCore::SetAutomaticCorrectionEnabled(Core::System& system, bool value) { diff --git a/src/core/hle/service/time/standard_user_system_clock_core.h b/src/core/hle/service/time/standard_user_system_clock_core.h index ef3d468b7..aac44d72f 100644 --- a/src/core/hle/service/time/standard_user_system_clock_core.h +++ b/src/core/hle/service/time/standard_user_system_clock_core.h @@ -4,7 +4,6 @@ #pragma once -#include "core/hle/kernel/writable_event.h" #include "core/hle/service/time/clock_types.h" #include "core/hle/service/time/system_clock_core.h" @@ -12,6 +11,10 @@ namespace Core { class System; } +namespace Kernel { +class KEvent; +} + namespace Service::Time::Clock { class StandardLocalSystemClockCore; @@ -51,7 +54,7 @@ private: StandardNetworkSystemClockCore& network_system_clock_core; bool auto_correction_enabled{}; SteadyClockTimePoint auto_correction_time; - Kernel::EventPair auto_correction_event; + std::shared_ptr<Kernel::KEvent> auto_correction_event; }; } // namespace Service::Time::Clock 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 index 5cdb80703..bca7d869e 100644 --- a/src/core/hle/service/time/system_clock_context_update_callback.cpp +++ b/src/core/hle/service/time/system_clock_context_update_callback.cpp @@ -2,7 +2,7 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include "core/hle/kernel/writable_event.h" +#include "core/hle/kernel/k_writable_event.h" #include "core/hle/service/time/errors.h" #include "core/hle/service/time/system_clock_context_update_callback.h" @@ -21,7 +21,7 @@ bool SystemClockContextUpdateCallback::NeedUpdate(const SystemClockContext& valu } void SystemClockContextUpdateCallback::RegisterOperationEvent( - std::shared_ptr<Kernel::WritableEvent>&& writable_event) { + std::shared_ptr<Kernel::KWritableEvent>&& writable_event) { operation_event_list.emplace_back(std::move(writable_event)); } diff --git a/src/core/hle/service/time/system_clock_context_update_callback.h b/src/core/hle/service/time/system_clock_context_update_callback.h index 2b0fa7e75..797954958 100644 --- a/src/core/hle/service/time/system_clock_context_update_callback.h +++ b/src/core/hle/service/time/system_clock_context_update_callback.h @@ -9,7 +9,7 @@ #include "core/hle/service/time/clock_types.h" namespace Kernel { -class WritableEvent; +class KWritableEvent; } namespace Service::Time::Clock { @@ -24,7 +24,7 @@ public: bool NeedUpdate(const SystemClockContext& value) const; - void RegisterOperationEvent(std::shared_ptr<Kernel::WritableEvent>&& writable_event); + void RegisterOperationEvent(std::shared_ptr<Kernel::KWritableEvent>&& writable_event); void BroadcastOperationEvent(); @@ -37,7 +37,7 @@ protected: private: bool has_context{}; - std::vector<std::shared_ptr<Kernel::WritableEvent>> operation_event_list; + std::vector<std::shared_ptr<Kernel::KWritableEvent>> operation_event_list; }; } // namespace Service::Time::Clock |