mirror of
https://github.com/citra-emu/citra.git
synced 2024-12-18 14:20:05 +00:00
Fixed a bug (??) in arm_dynarmic where PageTableChanged could reset the CPU context
This commit is contained in:
parent
b2370ea353
commit
35c3ca995c
@ -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…
Reference in New Issue
Block a user