mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Core: pause on panic handler option
This commit is contained in:
@ -68,6 +68,12 @@ void AdvancedPane::CreateLayout()
|
||||
"Enables the Memory Management Unit, needed for some games. (ON = Compatible, OFF = Fast)"));
|
||||
cpu_options_group_layout->addWidget(m_enable_mmu_checkbox);
|
||||
|
||||
m_pause_on_panic_checkbox = new QCheckBox(tr("Pause on Panic"));
|
||||
m_pause_on_panic_checkbox->setToolTip(
|
||||
tr("Pauses the emulation if a Read/Write or Unknown Instruction panic occurs.\nEnabling will "
|
||||
"affect performance.\nThe performance impact is the same as having Enable MMU on."));
|
||||
cpu_options_group_layout->addWidget(m_pause_on_panic_checkbox);
|
||||
|
||||
auto* clock_override = new QGroupBox(tr("Clock Override"));
|
||||
auto* clock_override_layout = new QVBoxLayout();
|
||||
clock_override->setLayout(clock_override_layout);
|
||||
@ -180,6 +186,9 @@ void AdvancedPane::ConnectLayout()
|
||||
connect(m_enable_mmu_checkbox, &QCheckBox::toggled, this,
|
||||
[](bool checked) { Config::SetBaseOrCurrent(Config::MAIN_MMU, checked); });
|
||||
|
||||
connect(m_pause_on_panic_checkbox, &QCheckBox::toggled, this,
|
||||
[](bool checked) { Config::SetBaseOrCurrent(Config::MAIN_PAUSE_ON_PANIC, checked); });
|
||||
|
||||
m_cpu_clock_override_checkbox->setChecked(Config::Get(Config::MAIN_OVERCLOCK_ENABLE));
|
||||
connect(m_cpu_clock_override_checkbox, &QCheckBox::toggled, [this](bool enable_clock_override) {
|
||||
Config::SetBaseOrCurrent(Config::MAIN_OVERCLOCK_ENABLE, enable_clock_override);
|
||||
@ -246,6 +255,9 @@ void AdvancedPane::Update()
|
||||
m_enable_mmu_checkbox->setChecked(Config::Get(Config::MAIN_MMU));
|
||||
m_enable_mmu_checkbox->setEnabled(!running);
|
||||
|
||||
m_pause_on_panic_checkbox->setChecked(Config::Get(Config::MAIN_PAUSE_ON_PANIC));
|
||||
m_pause_on_panic_checkbox->setEnabled(!running);
|
||||
|
||||
QFont bf = font();
|
||||
bf.setBold(Config::GetActiveLayerForConfig(Config::MAIN_OVERCLOCK_ENABLE) !=
|
||||
Config::LayerType::Base);
|
||||
|
Reference in New Issue
Block a user