summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-12-30 04:36:29 +0100
committerbunnei <bunneidev@gmail.com>2015-12-30 04:36:29 +0100
commit4bc961d5fd105f894f4f993b693b2496d14dc773 (patch)
tree2dafa3f03da381282734de0c68cb43916f37c346 /src
parentMerge pull request #1303 from lioncash/unique (diff)
parentHLE/Timers: Reset OneShot timers when they are acquired instead of when they're triggered. (diff)
downloadyuzu-4bc961d5fd105f894f4f993b693b2496d14dc773.tar
yuzu-4bc961d5fd105f894f4f993b693b2496d14dc773.tar.gz
yuzu-4bc961d5fd105f894f4f993b693b2496d14dc773.tar.bz2
yuzu-4bc961d5fd105f894f4f993b693b2496d14dc773.tar.lz
yuzu-4bc961d5fd105f894f4f993b693b2496d14dc773.tar.xz
yuzu-4bc961d5fd105f894f4f993b693b2496d14dc773.tar.zst
yuzu-4bc961d5fd105f894f4f993b693b2496d14dc773.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/kernel/timer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/kernel/timer.cpp b/src/core/hle/kernel/timer.cpp
index 08b3ea8c0..ce6bbd719 100644
--- a/src/core/hle/kernel/timer.cpp
+++ b/src/core/hle/kernel/timer.cpp
@@ -42,6 +42,9 @@ bool Timer::ShouldWait() {
void Timer::Acquire() {
ASSERT_MSG( !ShouldWait(), "object unavailable!");
+
+ if (reset_type == RESETTYPE_ONESHOT)
+ signaled = false;
}
void Timer::Set(s64 initial, s64 interval) {
@@ -84,9 +87,6 @@ static void TimerCallback(u64 timer_handle, int cycles_late) {
// Resume all waiting threads
timer->WakeupAllWaitingThreads();
- if (timer->reset_type == RESETTYPE_ONESHOT)
- timer->signaled = false;
-
if (timer->interval_delay != 0) {
// Reschedule the timer with the interval delay
u64 interval_microseconds = timer->interval_delay / 1000;