mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-27 08:05:41 +00:00
System: Prevent using both runahead and rewind concurrently
This commit is contained in:
parent
3f96473fb5
commit
b3ce2b21c0
|
@ -672,6 +672,19 @@ void HostInterface::FixIncompatibleSettings(bool display_osd_messages)
|
||||||
Log_WarningPrintf("Disabling mmap fastmem due to rewind being enabled");
|
Log_WarningPrintf("Disabling mmap fastmem due to rewind being enabled");
|
||||||
g_settings.cpu_fastmem_mode = CPUFastmemMode::LUT;
|
g_settings.cpu_fastmem_mode = CPUFastmemMode::LUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// code compilation is too slow with runahead, use the recompiler
|
||||||
|
if (g_settings.runahead_enable && g_settings.IsUsingCodeCache())
|
||||||
|
{
|
||||||
|
Log_WarningPrintf("Code cache/recompiler disabled due to runahead");
|
||||||
|
g_settings.cpu_execution_mode = CPUExecutionMode::Interpreter;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_settings.runahead_enable && g_settings.rewind_enable)
|
||||||
|
{
|
||||||
|
Log_WarningPrintf("Rewind disabled due to runahead being enabled");
|
||||||
|
g_settings.rewind_enable = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void HostInterface::SaveSettings(SettingsInterface& si)
|
void HostInterface::SaveSettings(SettingsInterface& si)
|
||||||
|
|
|
@ -101,7 +101,7 @@ void EmulationSettingsWidget::onTurboSpeedIndexChanged(int index)
|
||||||
|
|
||||||
void EmulationSettingsWidget::updateRewindSummaryLabel()
|
void EmulationSettingsWidget::updateRewindSummaryLabel()
|
||||||
{
|
{
|
||||||
if (m_ui.rewindEnable->isChecked())
|
if (m_ui.rewindEnable->isEnabled() && m_ui.rewindEnable->isChecked())
|
||||||
{
|
{
|
||||||
const u32 frames = static_cast<u32>(m_ui.rewindSaveSlots->value());
|
const u32 frames = static_cast<u32>(m_ui.rewindSaveSlots->value());
|
||||||
const float frequency = static_cast<float>(m_ui.rewindSaveFrequency->value());
|
const float frequency = static_cast<float>(m_ui.rewindSaveFrequency->value());
|
||||||
|
@ -122,8 +122,15 @@ void EmulationSettingsWidget::updateRewindSummaryLabel()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_ui.rewindSummary->setText(
|
if (!m_ui.rewindEnable->isEnabled())
|
||||||
tr("Rewind is not enabled. Please note that enabling rewind may significantly increase system requirements."));
|
{
|
||||||
|
m_ui.rewindSummary->setText(tr("Rewind is disabled because runahead is enabled."));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_ui.rewindSummary->setText(
|
||||||
|
tr("Rewind is not enabled. Please note that enabling rewind may significantly increase system requirements."));
|
||||||
|
}
|
||||||
m_ui.rewindSaveFrequency->setEnabled(false);
|
m_ui.rewindSaveFrequency->setEnabled(false);
|
||||||
m_ui.rewindSaveSlots->setEnabled(false);
|
m_ui.rewindSaveSlots->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
@ -132,4 +139,6 @@ void EmulationSettingsWidget::updateRewindSummaryLabel()
|
||||||
void EmulationSettingsWidget::updateRunaheadFields()
|
void EmulationSettingsWidget::updateRunaheadFields()
|
||||||
{
|
{
|
||||||
m_ui.runaheadFrames->setEnabled(m_ui.runaheadEnable->isChecked());
|
m_ui.runaheadFrames->setEnabled(m_ui.runaheadEnable->isChecked());
|
||||||
|
m_ui.rewindEnable->setEnabled(!m_ui.runaheadEnable->isChecked());
|
||||||
|
updateRewindSummaryLabel();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue