summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Kelebek12022-08-02 05:28:31 +0100
committerGravatar Morph2022-08-02 01:01:54 -0400
commit658e1ee4267f0475445c7152560783444fcda7d2 (patch)
tree658e53e95e9df0bd5654dea6b42fcba3d52ea83a /src
parentMake coretiming waiting more accurate (diff)
downloadyuzu-658e1ee4267f0475445c7152560783444fcda7d2.tar.gz
yuzu-658e1ee4267f0475445c7152560783444fcda7d2.tar.xz
yuzu-658e1ee4267f0475445c7152560783444fcda7d2.zip
Add missing looping event schedule signal
Diffstat (limited to '')
-rw-r--r--src/core/core_timing.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp
index b45c1b918..a75bfea60 100644
--- a/src/core/core_timing.cpp
+++ b/src/core/core_timing.cpp
@@ -143,13 +143,17 @@ void CoreTiming::ScheduleLoopingEvent(std::chrono::nanoseconds start_time,
143 std::chrono::nanoseconds resched_time, 143 std::chrono::nanoseconds resched_time,
144 const std::shared_ptr<EventType>& event_type, 144 const std::shared_ptr<EventType>& event_type,
145 std::uintptr_t user_data, bool absolute_time) { 145 std::uintptr_t user_data, bool absolute_time) {
146 std::scoped_lock scope{basic_lock}; 146 {
147 const auto next_time{absolute_time ? start_time : GetGlobalTimeNs() + start_time}; 147 std::scoped_lock scope{basic_lock};
148 const auto next_time{absolute_time ? start_time : GetGlobalTimeNs() + start_time};
149
150 event_queue.emplace_back(
151 Event{next_time.count(), event_fifo_id++, user_data, event_type, resched_time.count()});
148 152
149 event_queue.emplace_back( 153 std::push_heap(event_queue.begin(), event_queue.end(), std::greater<>());
150 Event{next_time.count(), event_fifo_id++, user_data, event_type, resched_time.count()}); 154 }
151 155
152 std::push_heap(event_queue.begin(), event_queue.end(), std::greater<>()); 156 event.Set();
153} 157}
154 158
155void CoreTiming::UnscheduleEvent(const std::shared_ptr<EventType>& event_type, 159void CoreTiming::UnscheduleEvent(const std::shared_ptr<EventType>& event_type,