diff options
author | bunnei <bunneidev@gmail.com> | 2021-04-04 08:22:07 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-05-06 01:40:50 +0200 |
commit | 086db71e942dc3468bccb741cabf62fdd221e790 (patch) | |
tree | 46dda7ba6a9d2a1590b09ddddb450595879b2896 /src/core/hle/service/time/time_sharedmemory.cpp | |
parent | hle: kernel: Migrate KProcess to KAutoObject. (diff) | |
download | yuzu-086db71e942dc3468bccb741cabf62fdd221e790.tar yuzu-086db71e942dc3468bccb741cabf62fdd221e790.tar.gz yuzu-086db71e942dc3468bccb741cabf62fdd221e790.tar.bz2 yuzu-086db71e942dc3468bccb741cabf62fdd221e790.tar.lz yuzu-086db71e942dc3468bccb741cabf62fdd221e790.tar.xz yuzu-086db71e942dc3468bccb741cabf62fdd221e790.tar.zst yuzu-086db71e942dc3468bccb741cabf62fdd221e790.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/time/time_sharedmemory.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/core/hle/service/time/time_sharedmemory.cpp b/src/core/hle/service/time/time_sharedmemory.cpp index 018ce94ed..eb57899f6 100644 --- a/src/core/hle/service/time/time_sharedmemory.cpp +++ b/src/core/hle/service/time/time_sharedmemory.cpp @@ -16,16 +16,11 @@ namespace Service::Time { static constexpr std::size_t SHARED_MEMORY_SIZE{0x1000}; SharedMemory::SharedMemory(Core::System& system) : system(system) { - shared_memory_holder = SharedFrom(&system.Kernel().GetTimeSharedMem()); - std::memset(shared_memory_holder->GetPointer(), 0, SHARED_MEMORY_SIZE); + std::memset(system.Kernel().GetTimeSharedMem().GetPointer(), 0, SHARED_MEMORY_SIZE); } SharedMemory::~SharedMemory() = default; -std::shared_ptr<Kernel::KSharedMemory> SharedMemory::GetSharedMemoryHolder() const { - return shared_memory_holder; -} - void SharedMemory::SetupStandardSteadyClock(const Common::UUID& clock_source_id, Clock::TimeSpanType current_time_point) { const Clock::TimeSpanType ticks_time_span{Clock::TimeSpanType::FromTicks( @@ -34,22 +29,22 @@ void SharedMemory::SetupStandardSteadyClock(const Common::UUID& clock_source_id, static_cast<u64>(current_time_point.nanoseconds - ticks_time_span.nanoseconds), clock_source_id}; shared_memory_format.standard_steady_clock_timepoint.StoreData( - shared_memory_holder->GetPointer(), context); + system.Kernel().GetTimeSharedMem().GetPointer(), context); } void SharedMemory::UpdateLocalSystemClockContext(const Clock::SystemClockContext& context) { shared_memory_format.standard_local_system_clock_context.StoreData( - shared_memory_holder->GetPointer(), context); + system.Kernel().GetTimeSharedMem().GetPointer(), context); } void SharedMemory::UpdateNetworkSystemClockContext(const Clock::SystemClockContext& context) { shared_memory_format.standard_network_system_clock_context.StoreData( - shared_memory_holder->GetPointer(), context); + system.Kernel().GetTimeSharedMem().GetPointer(), context); } void SharedMemory::SetAutomaticCorrectionEnabled(bool is_enabled) { shared_memory_format.standard_user_system_clock_automatic_correction.StoreData( - shared_memory_holder->GetPointer(), is_enabled); + system.Kernel().GetTimeSharedMem().GetPointer(), is_enabled); } } // namespace Service::Time |