System: Reinitialize code cache on hw settings change/disc swap

Basically, anything which could allocate large amounts of memory and
potentially overlap with our fastmem area.
This commit is contained in:
Connor McLaughlin
2020-12-05 13:40:44 +10:00
parent 1c9d0967b1
commit 8b3426a96e
2 changed files with 7 additions and 0 deletions

View File

@ -1609,6 +1609,10 @@ bool InsertMedia(const char* path)
UpdateMemoryCards();
}
// reinitialize recompiler, because especially with preloading this might overlap the fastmem area
if (g_settings.IsUsingCodeCache())
CPU::CodeCache::Reinitialize();
return true;
}