VERY experimental Nintendo Switch 2 emulator
C++
HLE/Timers: Reset OneShot timers when they are acquired instead of when they're triggered.
Subv9aa852982f20
diff --git a/src/core/hle/kernel/timer.cpp b/src/core/hle/kernel/timer.cppindex 08b3ea8c0b..ce6bbd7197 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 threadstimer->WakeupAllWaitingThreads();- if (timer->reset_type == RESETTYPE_ONESHOT)- timer->signaled = false;-if (timer->interval_delay != 0) {// Reschedule the timer with the interval delayu64 interval_microseconds = timer->interval_delay / 1000;