VERY experimental Nintendo Switch 2 emulator
C++
Merge pull request #2397 from Subv/pulse
bunneicb38ee3497e4
diff --cc src/core/hle/kernel/event.cppindex e1f42af051,a515f53f99..23f9df0d63--- a/src/core/hle/kernel/event.cpp+++ b/src/core/hle/kernel/event.cpp@@@ -34,11 -29,10 +29,10 @@@ bool Event::ShouldWait(Thread* thread)return !signaled;}-void Event::Acquire() {- ASSERT_MSG(!ShouldWait(), "object unavailable!");+void Event::Acquire(Thread* thread) {+ ASSERT_MSG(!ShouldWait(thread), "object unavailable!");- // Release the event if it's not sticky...- if (reset_type != ResetType::Sticky)+ if (reset_type == ResetType::OneShot)signaled = false;}diff --cc src/core/hle/kernel/event.hindex 39452bf338,28d955b1e4..3e3673508f--- a/src/core/hle/kernel/event.h+++ b/src/core/hle/kernel/event.h@@@ -35,9 -35,11 +35,11 @@@ publicbool signaled; ///< Whether the event has already been signaledstd::string name; ///< Name of event (optional)- bool ShouldWait() override;- void Acquire() override;+ bool ShouldWait(Thread* thread) const override;+ void Acquire(Thread* thread) override;+ void WakeupAllWaitingThreads() override;+void Signal();void Clear();diff --cc src/core/hle/kernel/timer.hindex 2e3b31b23d,2092165d4a..c174f56641--- a/src/core/hle/kernel/timer.h+++ b/src/core/hle/kernel/timer.h@@@ -39,9 -39,11 +39,11 @@@ publicu64 initial_delay; ///< The delay until the timer fires for the first timeu64 interval_delay; ///< The delay until the timer fires after the first time- bool ShouldWait() override;- void Acquire() override;+ bool ShouldWait(Thread* thread) const override;+ void Acquire(Thread* thread) override;+ void WakeupAllWaitingThreads() override;+/*** Starts the timer, with the specified initial delay and interval.* @param initial Delay until the timer is first fired