diff options
| author | 2020-07-15 19:14:21 -0400 | |
|---|---|---|
| committer | 2020-07-15 19:41:22 -0400 | |
| commit | bef1844a51a37c1c8dc531e67069ef00821ffa9c (patch) | |
| tree | 2e46f404c3f0baf1b854e1bea916c19469fe424a /src/core/hardware_interrupt_manager.cpp | |
| parent | core_timing: Make use of std::chrono with ScheduleEvent (diff) | |
| download | yuzu-bef1844a51a37c1c8dc531e67069ef00821ffa9c.tar.gz yuzu-bef1844a51a37c1c8dc531e67069ef00821ffa9c.tar.xz yuzu-bef1844a51a37c1c8dc531e67069ef00821ffa9c.zip | |
core_timing: Make TimedCallback take std::chrono::nanoseconds
Enforces our desired time units directly with a concrete type.
Diffstat (limited to 'src/core/hardware_interrupt_manager.cpp')
| -rw-r--r-- | src/core/hardware_interrupt_manager.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/core/hardware_interrupt_manager.cpp b/src/core/hardware_interrupt_manager.cpp index e7fd71e2e..efc1030c1 100644 --- a/src/core/hardware_interrupt_manager.cpp +++ b/src/core/hardware_interrupt_manager.cpp | |||
| @@ -11,12 +11,13 @@ | |||
| 11 | namespace Core::Hardware { | 11 | namespace Core::Hardware { |
| 12 | 12 | ||
| 13 | InterruptManager::InterruptManager(Core::System& system_in) : system(system_in) { | 13 | InterruptManager::InterruptManager(Core::System& system_in) : system(system_in) { |
| 14 | gpu_interrupt_event = Core::Timing::CreateEvent("GPUInterrupt", [this](u64 message, s64) { | 14 | gpu_interrupt_event = |
| 15 | auto nvdrv = system.ServiceManager().GetService<Service::Nvidia::NVDRV>("nvdrv"); | 15 | Core::Timing::CreateEvent("GPUInterrupt", [this](u64 message, std::chrono::nanoseconds) { |
| 16 | const u32 syncpt = static_cast<u32>(message >> 32); | 16 | auto nvdrv = system.ServiceManager().GetService<Service::Nvidia::NVDRV>("nvdrv"); |
| 17 | const u32 value = static_cast<u32>(message); | 17 | const u32 syncpt = static_cast<u32>(message >> 32); |
| 18 | nvdrv->SignalGPUInterruptSyncpt(syncpt, value); | 18 | const u32 value = static_cast<u32>(message); |
| 19 | }); | 19 | nvdrv->SignalGPUInterruptSyncpt(syncpt, value); |
| 20 | }); | ||
| 20 | } | 21 | } |
| 21 | 22 | ||
| 22 | InterruptManager::~InterruptManager() = default; | 23 | InterruptManager::~InterruptManager() = default; |