diff options
author | bunnei <bunneidev@gmail.com> | 2019-03-26 02:06:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-26 02:06:33 +0100 |
commit | 595511876e9669c09c7b60a2fa4a1164dc5d0e66 (patch) | |
tree | dc2ab78d68f54f61d06fe0596d104cd16cbd3fbe /src/core/hle/service | |
parent | Merge pull request #2286 from lioncash/fwd (diff) | |
parent | core/core_timing: Make callback parameters consistent (diff) | |
download | yuzu-595511876e9669c09c7b60a2fa4a1164dc5d0e66.tar yuzu-595511876e9669c09c7b60a2fa4a1164dc5d0e66.tar.gz yuzu-595511876e9669c09c7b60a2fa4a1164dc5d0e66.tar.bz2 yuzu-595511876e9669c09c7b60a2fa4a1164dc5d0e66.tar.lz yuzu-595511876e9669c09c7b60a2fa4a1164dc5d0e66.tar.xz yuzu-595511876e9669c09c7b60a2fa4a1164dc5d0e66.tar.zst yuzu-595511876e9669c09c7b60a2fa4a1164dc5d0e66.zip |
Diffstat (limited to 'src/core/hle/service')
-rw-r--r-- | src/core/hle/service/hid/hid.cpp | 10 | ||||
-rw-r--r-- | src/core/hle/service/hid/hid.h | 2 | ||||
-rw-r--r-- | src/core/hle/service/nvflinger/nvflinger.cpp | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 8a6de83a2..63b55758b 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp @@ -36,9 +36,9 @@ namespace Service::HID { // Updating period for each HID device. // TODO(ogniK): Find actual polling rate of hid -constexpr u64 pad_update_ticks = Core::Timing::BASE_CLOCK_RATE / 66; -constexpr u64 accelerometer_update_ticks = Core::Timing::BASE_CLOCK_RATE / 100; -constexpr u64 gyroscope_update_ticks = Core::Timing::BASE_CLOCK_RATE / 100; +constexpr s64 pad_update_ticks = static_cast<s64>(Core::Timing::BASE_CLOCK_RATE / 66); +constexpr s64 accelerometer_update_ticks = static_cast<s64>(Core::Timing::BASE_CLOCK_RATE / 100); +constexpr s64 gyroscope_update_ticks = static_cast<s64>(Core::Timing::BASE_CLOCK_RATE / 100); constexpr std::size_t SHARED_MEMORY_SIZE = 0x40000; IAppletResource::IAppletResource() : ServiceFramework("IAppletResource") { @@ -75,7 +75,7 @@ IAppletResource::IAppletResource() : ServiceFramework("IAppletResource") { // Register update callbacks auto& core_timing = Core::System::GetInstance().CoreTiming(); pad_update_event = - core_timing.RegisterEvent("HID::UpdatePadCallback", [this](u64 userdata, int cycles_late) { + core_timing.RegisterEvent("HID::UpdatePadCallback", [this](u64 userdata, s64 cycles_late) { UpdateControllers(userdata, cycles_late); }); @@ -106,7 +106,7 @@ void IAppletResource::GetSharedMemoryHandle(Kernel::HLERequestContext& ctx) { rb.PushCopyObjects(shared_mem); } -void IAppletResource::UpdateControllers(u64 userdata, int cycles_late) { +void IAppletResource::UpdateControllers(u64 userdata, s64 cycles_late) { auto& core_timing = Core::System::GetInstance().CoreTiming(); const bool should_reload = Settings::values.is_device_reload_pending.exchange(false); diff --git a/src/core/hle/service/hid/hid.h b/src/core/hle/service/hid/hid.h index 498602de5..d3660cad2 100644 --- a/src/core/hle/service/hid/hid.h +++ b/src/core/hle/service/hid/hid.h @@ -65,7 +65,7 @@ private: } void GetSharedMemoryHandle(Kernel::HLERequestContext& ctx); - void UpdateControllers(u64 userdata, int cycles_late); + void UpdateControllers(u64 userdata, s64 cycles_late); Kernel::SharedPtr<Kernel::SharedMemory> shared_mem; diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp index fc496b654..c7f5bbf28 100644 --- a/src/core/hle/service/nvflinger/nvflinger.cpp +++ b/src/core/hle/service/nvflinger/nvflinger.cpp @@ -26,7 +26,7 @@ namespace Service::NVFlinger { constexpr std::size_t SCREEN_REFRESH_RATE = 60; -constexpr u64 frame_ticks = static_cast<u64>(Core::Timing::BASE_CLOCK_RATE / SCREEN_REFRESH_RATE); +constexpr s64 frame_ticks = static_cast<s64>(Core::Timing::BASE_CLOCK_RATE / SCREEN_REFRESH_RATE); NVFlinger::NVFlinger(Core::Timing::CoreTiming& core_timing) : core_timing{core_timing} { displays.emplace_back(0, "Default"); @@ -37,7 +37,7 @@ NVFlinger::NVFlinger(Core::Timing::CoreTiming& core_timing) : core_timing{core_t // Schedule the screen composition events composition_event = - core_timing.RegisterEvent("ScreenComposition", [this](u64 userdata, int cycles_late) { + core_timing.RegisterEvent("ScreenComposition", [this](u64 userdata, s64 cycles_late) { Compose(); this->core_timing.ScheduleEvent(frame_ticks - cycles_late, composition_event); }); |