System: UpdateCPUExecutionMode -> SetCPUExecutionMode

This commit is contained in:
Stenzek
2020-02-05 17:43:00 +09:00
parent 93f85535eb
commit c26b9bc54c
3 changed files with 12 additions and 10 deletions

View File

@ -88,6 +88,13 @@ void System::UpdateGPUSettings()
m_gpu->UpdateSettings();
}
void System::SetCPUExecutionMode(CPUExecutionMode mode)
{
m_cpu_execution_mode = mode;
m_cpu_code_cache->Flush();
m_cpu_code_cache->SetUseRecompiler(mode == CPUExecutionMode::Recompiler);
}
bool System::Boot(const char* filename)
{
// Load CD image up and detect region.
@ -509,13 +516,6 @@ void System::UpdateMemoryCards()
}
}
void System::UpdateCPUExecutionMode()
{
m_cpu_execution_mode = GetSettings().cpu_execution_mode;
m_cpu_code_cache->Flush();
m_cpu_code_cache->SetUseRecompiler(m_cpu_execution_mode == CPUExecutionMode::Recompiler);
}
bool System::HasMedia() const
{
return m_cdrom->HasMedia();

View File

@ -80,6 +80,9 @@ public:
/// Updates GPU settings, without recreating the renderer.
void UpdateGPUSettings();
/// Forcibly changes the CPU execution mode, ignoring settings.
void SetCPUExecutionMode(CPUExecutionMode mode);
void RunFrame();
bool LoadEXE(const char* filename, std::vector<u8>& bios_image);
@ -92,7 +95,6 @@ public:
Controller* GetController(u32 slot) const;
void UpdateControllers();
void UpdateMemoryCards();
void UpdateCPUExecutionMode();
bool HasMedia() const;
bool InsertMedia(const char* path);