diff --git a/Source/Core/Core/ConfigManager.cpp b/Source/Core/Core/ConfigManager.cpp index 1aa1b3f0a6..461c638e82 100644 --- a/Source/Core/Core/ConfigManager.cpp +++ b/Source/Core/Core/ConfigManager.cpp @@ -234,6 +234,7 @@ void SConfig::SaveCoreSettings(IniFile& ini) core->Set("WiimoteEnableSpeaker", m_WiimoteEnableSpeaker); core->Set("RunCompareServer", bRunCompareServer); core->Set("RunCompareClient", bRunCompareClient); + core->Set("MMU", bMMU); core->Set("EmulationSpeed", m_EmulationSpeed); core->Set("Overclock", m_OCFactor); core->Set("OverclockEnable", m_OCEnable); @@ -765,11 +766,7 @@ void SConfig::LoadDefaults() bFastmem = true; bFPRF = false; bAccurateNaNs = false; -#ifdef _M_X86_64 - bMMU = true; -#else bMMU = false; -#endif bLowDCBZHack = false; iBBDumpPort = -1; bSyncGPU = false; diff --git a/Source/Core/DolphinQt/Settings/AdvancedPane.cpp b/Source/Core/DolphinQt/Settings/AdvancedPane.cpp index 8562bb74b0..cf7493a619 100644 --- a/Source/Core/DolphinQt/Settings/AdvancedPane.cpp +++ b/Source/Core/DolphinQt/Settings/AdvancedPane.cpp @@ -63,6 +63,9 @@ void AdvancedPane::CreateLayout() cpu_emulation_layout->addWidget(m_cpu_emulation_engine_combobox, 0, 1, Qt::AlignLeft); cpu_options_layout->addLayout(cpu_emulation_layout); + m_enable_mmu_checkbox = new QCheckBox(tr("Enable MMU")); + cpu_options_layout->addWidget(m_enable_mmu_checkbox); + auto* clock_override = new QGroupBox(tr("Clock Override")); auto* clock_override_layout = new QVBoxLayout(); clock_override->setLayout(clock_override_layout); @@ -134,6 +137,9 @@ void AdvancedPane::ConnectLayout() Config::SetBaseOrCurrent(Config::MAIN_CPU_CORE, PowerPC::AvailableCPUCores()[index]); }); + connect(m_enable_mmu_checkbox, &QCheckBox::toggled, this, + [this](bool checked) { SConfig::GetInstance().bMMU = checked; }); + m_cpu_clock_override_checkbox->setChecked(SConfig::GetInstance().m_OCEnable); connect(m_cpu_clock_override_checkbox, &QCheckBox::toggled, [this](bool enable_clock_override) { SConfig::GetInstance().m_OCEnable = enable_clock_override; @@ -178,6 +184,9 @@ void AdvancedPane::Update() } m_cpu_emulation_engine_combobox->setEnabled(!running); + m_enable_mmu_checkbox->setChecked(SConfig::GetInstance().bMMU); + m_enable_mmu_checkbox->setEnabled(!running); + QFont bf = font(); bf.setBold(Config::GetActiveLayerForConfig(Config::MAIN_OVERCLOCK_ENABLE) != Config::LayerType::Base); diff --git a/Source/Core/DolphinQt/Settings/AdvancedPane.h b/Source/Core/DolphinQt/Settings/AdvancedPane.h index 5b3ac07f1b..a625038a12 100644 --- a/Source/Core/DolphinQt/Settings/AdvancedPane.h +++ b/Source/Core/DolphinQt/Settings/AdvancedPane.h @@ -32,6 +32,7 @@ private: void Update(); QComboBox* m_cpu_emulation_engine_combobox; + QCheckBox* m_enable_mmu_checkbox; QCheckBox* m_cpu_clock_override_checkbox; QSlider* m_cpu_clock_override_slider; QLabel* m_cpu_clock_override_slider_label;