diff --git a/src/core/host_interface.cpp b/src/core/host_interface.cpp index fdcf68423..2afa60129 100644 --- a/src/core/host_interface.cpp +++ b/src/core/host_interface.cpp @@ -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(); } diff --git a/src/core/system.cpp b/src/core/system.cpp index f5ea83eeb..ecbf39982 100644 --- a/src/core/system.cpp +++ b/src/core/system.cpp @@ -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; }