mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-11-03 23:28:48 +00:00 
			
		
		
		
	Switch context on the same thread if necessary
This commit is contained in:
		
							parent
							
								
									ab4b27f0f5
								
							
						
					
					
						commit
						81d3462a19
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -542,8 +542,12 @@ void Reschedule() {
 | 
			
		|||
 | 
			
		||||
    HLE::DoneRescheduling();
 | 
			
		||||
 | 
			
		||||
    // Don't bother switching to the same thread
 | 
			
		||||
    if (next == cur)
 | 
			
		||||
    // Don't bother switching to the same thread.
 | 
			
		||||
    // But if the thread was waiting on objects, we still need to switch it
 | 
			
		||||
    // to perform PC modification, change state to RUNNING, etc.
 | 
			
		||||
    // This occurs in the case when an object the thread is waiting on immediately wakes up
 | 
			
		||||
    // the current thread before Reschedule() is called.
 | 
			
		||||
    if (next == cur && (next == nullptr || next->waitsynch_waited == false))
 | 
			
		||||
        return;
 | 
			
		||||
 | 
			
		||||
    if (cur && next) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue