mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-11-03 23:28:48 +00:00 
			
		
		
		
	Fixed a bug (??) in arm_dynarmic where PageTableChanged could reset the CPU context
This commit is contained in:
		
							parent
							
								
									b2370ea353
								
							
						
					
					
						commit
						35c3ca995c
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -283,15 +283,21 @@ void ARM_Dynarmic::InvalidateCacheRange(u32 start_address, std::size_t length) {
 | 
			
		|||
 | 
			
		||||
void ARM_Dynarmic::PageTableChanged() {
 | 
			
		||||
    current_page_table = memory.GetCurrentPageTable();
 | 
			
		||||
    Dynarmic::A32::Context ctx{};
 | 
			
		||||
    if (jit) {
 | 
			
		||||
        jit->SaveContext(ctx);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    auto iter = jits.find(current_page_table);
 | 
			
		||||
    if (iter != jits.end()) {
 | 
			
		||||
        jit = iter->second.get();
 | 
			
		||||
        jit->LoadContext(ctx);
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    auto new_jit = MakeJit();
 | 
			
		||||
    jit = new_jit.get();
 | 
			
		||||
    jit->LoadContext(ctx);
 | 
			
		||||
    jits.emplace(current_page_table, std::move(new_jit));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue