diff options
author | bunnei <bunneidev@gmail.com> | 2020-08-23 08:11:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-23 08:11:14 +0200 |
commit | cfb7fd395ce8acb926669e597cb0e2793c6173cf (patch) | |
tree | 93464899cf03da237c1877873e50a0137ecf58e7 | |
parent | Merge pull request #4521 from lioncash/optionalcache (diff) | |
parent | core_timing: Remove unused header (diff) | |
download | yuzu-cfb7fd395ce8acb926669e597cb0e2793c6173cf.tar yuzu-cfb7fd395ce8acb926669e597cb0e2793c6173cf.tar.gz yuzu-cfb7fd395ce8acb926669e597cb0e2793c6173cf.tar.bz2 yuzu-cfb7fd395ce8acb926669e597cb0e2793c6173cf.tar.lz yuzu-cfb7fd395ce8acb926669e597cb0e2793c6173cf.tar.xz yuzu-cfb7fd395ce8acb926669e597cb0e2793c6173cf.tar.zst yuzu-cfb7fd395ce8acb926669e597cb0e2793c6173cf.zip |
-rw-r--r-- | src/core/core_timing.cpp | 12 | ||||
-rw-r--r-- | src/core/core_timing_util.cpp | 1 | ||||
-rw-r--r-- | src/core/core_timing_util.h | 1 |
3 files changed, 6 insertions, 8 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index 71af26ec5..e6c8461a5 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp @@ -7,14 +7,14 @@ #include <string> #include <tuple> -#include "common/assert.h" #include "common/microprofile.h" #include "core/core_timing.h" #include "core/core_timing_util.h" +#include "core/hardware_properties.h" namespace Core::Timing { -constexpr u64 MAX_SLICE_LENGTH = 4000; +constexpr s64 MAX_SLICE_LENGTH = 4000; std::shared_ptr<EventType> CreateEvent(std::string name, TimedCallback&& callback) { return std::make_shared<EventType>(std::move(callback), std::move(name)); @@ -37,10 +37,8 @@ struct CoreTiming::Event { } }; -CoreTiming::CoreTiming() { - clock = - Common::CreateBestMatchingClock(Core::Hardware::BASE_CLOCK_RATE, Core::Hardware::CNTFREQ); -} +CoreTiming::CoreTiming() + : clock{Common::CreateBestMatchingClock(Hardware::BASE_CLOCK_RATE, Hardware::CNTFREQ)} {} CoreTiming::~CoreTiming() = default; @@ -136,7 +134,7 @@ void CoreTiming::UnscheduleEvent(const std::shared_ptr<EventType>& event_type, void CoreTiming::AddTicks(u64 ticks) { this->ticks += ticks; - downcount -= ticks; + downcount -= static_cast<s64>(ticks); } void CoreTiming::Idle() { diff --git a/src/core/core_timing_util.cpp b/src/core/core_timing_util.cpp index aefc63663..8ce8e602e 100644 --- a/src/core/core_timing_util.cpp +++ b/src/core/core_timing_util.cpp @@ -8,6 +8,7 @@ #include <limits> #include "common/logging/log.h" #include "common/uint128.h" +#include "core/hardware_properties.h" namespace Core::Timing { diff --git a/src/core/core_timing_util.h b/src/core/core_timing_util.h index 2ed979e14..e4a046bf9 100644 --- a/src/core/core_timing_util.h +++ b/src/core/core_timing_util.h @@ -6,7 +6,6 @@ #include <chrono> #include "common/common_types.h" -#include "core/hardware_properties.h" namespace Core::Timing { |