mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	HLE/Timers: Reset OneShot timers when they are acquired instead of when they're triggered.
Closes #1139
This commit is contained in:
		
							parent
							
								
									73740d74ed
								
							
						
					
					
						commit
						6cccc36505
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		|  | @ -42,6 +42,9 @@ bool Timer::ShouldWait() { | ||||||
| 
 | 
 | ||||||
| void Timer::Acquire() { | void Timer::Acquire() { | ||||||
|     ASSERT_MSG( !ShouldWait(), "object unavailable!"); |     ASSERT_MSG( !ShouldWait(), "object unavailable!"); | ||||||
|  | 
 | ||||||
|  |     if (reset_type == RESETTYPE_ONESHOT) | ||||||
|  |         signaled = false; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void Timer::Set(s64 initial, s64 interval) { | void Timer::Set(s64 initial, s64 interval) { | ||||||
|  | @ -84,9 +87,6 @@ static void TimerCallback(u64 timer_handle, int cycles_late) { | ||||||
|     // Resume all waiting threads
 |     // Resume all waiting threads
 | ||||||
|     timer->WakeupAllWaitingThreads(); |     timer->WakeupAllWaitingThreads(); | ||||||
| 
 | 
 | ||||||
|     if (timer->reset_type == RESETTYPE_ONESHOT) |  | ||||||
|         timer->signaled = false; |  | ||||||
| 
 |  | ||||||
|     if (timer->interval_delay != 0) { |     if (timer->interval_delay != 0) { | ||||||
|         // Reschedule the timer with the interval delay
 |         // Reschedule the timer with the interval delay
 | ||||||
|         u64 interval_microseconds = timer->interval_delay / 1000; |         u64 interval_microseconds = timer->interval_delay / 1000; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue