mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-19 05:05:45 -04:00
System: Implement runahead
This commit is contained in:
@ -18,6 +18,8 @@ EmulationSettingsWidget::EmulationSettingsWidget(QtHostInterface* host_interface
|
||||
SettingWidgetBinder::BindWidgetToFloatSetting(m_host_interface, m_ui.rewindSaveFrequency, "Main", "RewindFrequency",
|
||||
10.0f);
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(m_host_interface, m_ui.rewindSaveSlots, "Main", "RewindSaveSlots", 10);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.runaheadEnable, "Main", "RunaheadEnable", false);
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(m_host_interface, m_ui.runaheadFrames, "Main", "RunaheadFrames", 1);
|
||||
|
||||
QtUtils::FillComboBoxWithEmulationSpeeds(m_ui.emulationSpeed);
|
||||
const int emulation_speed_index =
|
||||
@ -46,6 +48,7 @@ EmulationSettingsWidget::EmulationSettingsWidget(QtHostInterface* host_interface
|
||||
&EmulationSettingsWidget::updateRewindSummaryLabel);
|
||||
connect(m_ui.rewindSaveSlots, QOverload<int>::of(&QSpinBox::valueChanged), this,
|
||||
&EmulationSettingsWidget::updateRewindSummaryLabel);
|
||||
connect(m_ui.runaheadEnable, &QCheckBox::stateChanged, this, &EmulationSettingsWidget::updateRunaheadFields);
|
||||
|
||||
dialog->registerWidgetHelp(
|
||||
m_ui.emulationSpeed, tr("Emulation Speed"), "100%",
|
||||
@ -67,6 +70,7 @@ EmulationSettingsWidget::EmulationSettingsWidget(QtHostInterface* host_interface
|
||||
"should disable this option."));
|
||||
|
||||
updateRewindSummaryLabel();
|
||||
updateRunaheadFields();
|
||||
}
|
||||
|
||||
EmulationSettingsWidget::~EmulationSettingsWidget() = default;
|
||||
@ -124,3 +128,8 @@ void EmulationSettingsWidget::updateRewindSummaryLabel()
|
||||
m_ui.rewindSaveSlots->setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
void EmulationSettingsWidget::updateRunaheadFields()
|
||||
{
|
||||
m_ui.runaheadFrames->setEnabled(m_ui.runaheadEnable->isChecked());
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ private Q_SLOTS:
|
||||
void onFastForwardSpeedIndexChanged(int index);
|
||||
void onTurboSpeedIndexChanged(int index);
|
||||
void updateRewindSummaryLabel();
|
||||
void updateRunaheadFields();
|
||||
|
||||
private:
|
||||
|
||||
|
@ -138,6 +138,42 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Runahead</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="runaheadEnable">
|
||||
<property name="text">
|
||||
<string>Enable Runahead</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Runahead Frames:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="runaheadFrames">
|
||||
<property name="suffix">
|
||||
<string> Frames</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>20</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
|
Reference in New Issue
Block a user