mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-12-03 11:05:40 +00:00
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:
parent
1c9d0967b1
commit
8b3426a96e
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue