diff options
| author | 2023-12-23 14:06:41 -0500 | |
|---|---|---|
| committer | 2023-12-23 15:36:46 -0500 | |
| commit | 575db0417278eef0c854900885734fd068b97430 (patch) | |
| tree | 6663a52529852ca1279b7461807e3beb8ed312af /src/core/core_timing.h | |
| parent | core_timing: remove user data value (diff) | |
| download | yuzu-575db0417278eef0c854900885734fd068b97430.tar.gz yuzu-575db0417278eef0c854900885734fd068b97430.tar.xz yuzu-575db0417278eef0c854900885734fd068b97430.zip | |
core_timing: use static typing for no-wait unschedule
Diffstat (limited to 'src/core/core_timing.h')
| -rw-r--r-- | src/core/core_timing.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/core/core_timing.h b/src/core/core_timing.h index d86337cdc..d8cd599ee 100644 --- a/src/core/core_timing.h +++ b/src/core/core_timing.h | |||
| @@ -35,6 +35,11 @@ struct EventType { | |||
| 35 | const std::string name; | 35 | const std::string name; |
| 36 | }; | 36 | }; |
| 37 | 37 | ||
| 38 | enum class UnscheduleEventType { | ||
| 39 | Wait, | ||
| 40 | NoWait, | ||
| 41 | }; | ||
| 42 | |||
| 38 | /** | 43 | /** |
| 39 | * This is a system to schedule events into the emulated machine's future. Time is measured | 44 | * This is a system to schedule events into the emulated machine's future. Time is measured |
| 40 | * in main CPU clock cycles. | 45 | * in main CPU clock cycles. |
| @@ -98,11 +103,8 @@ public: | |||
| 98 | const std::shared_ptr<EventType>& event_type, | 103 | const std::shared_ptr<EventType>& event_type, |
| 99 | bool absolute_time = false); | 104 | bool absolute_time = false); |
| 100 | 105 | ||
| 101 | void UnscheduleEvent(const std::shared_ptr<EventType>& event_type, bool wait = true); | 106 | void UnscheduleEvent(const std::shared_ptr<EventType>& event_type, |
| 102 | 107 | UnscheduleEventType type = UnscheduleEventType::Wait); | |
| 103 | void UnscheduleEventWithoutWait(const std::shared_ptr<EventType>& event_type) { | ||
| 104 | UnscheduleEvent(event_type, false); | ||
| 105 | } | ||
| 106 | 108 | ||
| 107 | void AddTicks(u64 ticks_to_add); | 109 | void AddTicks(u64 ticks_to_add); |
| 108 | 110 | ||