diff options
Diffstat (limited to 'src/core/hardware_interrupt_manager.cpp')
| -rw-r--r-- | src/core/hardware_interrupt_manager.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/core/hardware_interrupt_manager.cpp b/src/core/hardware_interrupt_manager.cpp new file mode 100644 index 000000000..463d2916c --- /dev/null +++ b/src/core/hardware_interrupt_manager.cpp | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | |||
| 2 | #include "core/core.h" | ||
| 3 | #include "core/hardware_interrupt_manager.h" | ||
| 4 | #include "core/hle/service/nvdrv/interface.h" | ||
| 5 | #include "core/hle/service/sm/sm.h" | ||
| 6 | |||
| 7 | namespace Core::Hardware { | ||
| 8 | |||
| 9 | InterruptManager::InterruptManager(Core::System& system_in) : system(system_in) { | ||
| 10 | gpu_interrupt_event = | ||
| 11 | system.CoreTiming().RegisterEvent("GPUInterrupt", [this](u64 event_index, s64) { | ||
| 12 | auto nvdrv = system.ServiceManager().GetService<Service::Nvidia::NVDRV>("nvdrv"); | ||
| 13 | nvdrv->SignalGPUInterrupt(static_cast<u32>(event_index)); | ||
| 14 | }); | ||
| 15 | } | ||
| 16 | |||
| 17 | void InterruptManager::InterruptGPU(const u32 event_index) { | ||
| 18 | system.CoreTiming().ScheduleEvent(10, gpu_interrupt_event, static_cast<u64>(event_index)); | ||
| 19 | } | ||
| 20 | |||
| 21 | } // namespace Core::Hardware | ||