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:
1 parent
1c9d0967b1
commit
8b3426a96e
2 files changed
+7
No files matched your search
@@ -660,6 +660,9 @@ void HostInterface::CheckForSettingsChanges(const Settings& old_settings)
|
||||
g_settings.display_line_start_offset != old_settings.display_line_start_offset ||
|
||||
g_settings.display_line_end_offset != old_settings.display_line_end_offset)
|
||||
{
|
||||
if (g_settings.IsUsingCodeCache())
|
||||
CPU::CodeCache::Reinitialize();
|
||||
|
||||
g_gpu->UpdateSettings();
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user