summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/time/standard_user_system_clock_core.cpp
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2021-09-29 05:42:50 +0200
committerMorph <39850852+Morph1984@users.noreply.github.com>2021-10-02 05:38:59 +0200
commitfadcee14f8fca1b76b4ea48b1cfd136ccae8d182 (patch)
treea5787938bc73ff1b0b539e0945d3544d06a7d6d2 /src/core/hle/service/time/standard_user_system_clock_core.cpp
parentMerge pull request #7102 from Morph1984/remove-boxcat (diff)
downloadyuzu-fadcee14f8fca1b76b4ea48b1cfd136ccae8d182.tar
yuzu-fadcee14f8fca1b76b4ea48b1cfd136ccae8d182.tar.gz
yuzu-fadcee14f8fca1b76b4ea48b1cfd136ccae8d182.tar.bz2
yuzu-fadcee14f8fca1b76b4ea48b1cfd136ccae8d182.tar.lz
yuzu-fadcee14f8fca1b76b4ea48b1cfd136ccae8d182.tar.xz
yuzu-fadcee14f8fca1b76b4ea48b1cfd136ccae8d182.tar.zst
yuzu-fadcee14f8fca1b76b4ea48b1cfd136ccae8d182.zip
Diffstat (limited to 'src/core/hle/service/time/standard_user_system_clock_core.cpp')
-rw-r--r--src/core/hle/service/time/standard_user_system_clock_core.cpp14
1 files changed, 10 insertions, 4 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 ef79ab917..e94220a44 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,6 +4,7 @@
#include "common/assert.h"
#include "core/core.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"
@@ -16,10 +17,15 @@ StandardUserSystemClockCore::StandardUserSystemClockCore(
: SystemClockCore(local_system_clock_core_.GetSteadyClockCore()),
local_system_clock_core{local_system_clock_core_},
network_system_clock_core{network_system_clock_core_},
- auto_correction_time{SteadyClockTimePoint::GetRandom()}, auto_correction_event{
- system_.Kernel()} {
- Kernel::KAutoObject::Create(std::addressof(auto_correction_event));
- auto_correction_event.Initialize("StandardUserSystemClockCore:AutoCorrectionEvent");
+ auto_correction_time{SteadyClockTimePoint::GetRandom()}, service_context{
+ system_,
+ "StandardUserSystemClockCore"} {
+ auto_correction_event =
+ service_context.CreateEvent("StandardUserSystemClockCore:AutoCorrectionEvent");
+}
+
+StandardUserSystemClockCore::~StandardUserSystemClockCore() {
+ service_context.CloseEvent(auto_correction_event);
}
ResultCode StandardUserSystemClockCore::SetAutomaticCorrectionEnabled(Core::System& system,