mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-18 06:25:37 +00:00
Frontends: Add option for "Increase Timer Resolution"
This commit is contained in:
parent
e01cf0dccb
commit
6a1206dde7
|
@ -780,6 +780,7 @@ void HostInterface::SetDefaultSettings()
|
||||||
|
|
||||||
void HostInterface::UpdateSettings(const std::function<void()>& apply_callback)
|
void HostInterface::UpdateSettings(const std::function<void()>& apply_callback)
|
||||||
{
|
{
|
||||||
|
const bool old_increase_timer_resolution = m_settings.increase_timer_resolution;
|
||||||
const float old_emulation_speed = m_settings.emulation_speed;
|
const float old_emulation_speed = m_settings.emulation_speed;
|
||||||
const CPUExecutionMode old_cpu_execution_mode = m_settings.cpu_execution_mode;
|
const CPUExecutionMode old_cpu_execution_mode = m_settings.cpu_execution_mode;
|
||||||
const AudioBackend old_audio_backend = m_settings.audio_backend;
|
const AudioBackend old_audio_backend = m_settings.audio_backend;
|
||||||
|
@ -813,7 +814,8 @@ void HostInterface::UpdateSettings(const std::function<void()>& apply_callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_settings.video_sync_enabled != old_vsync_enabled || m_settings.audio_sync_enabled != old_audio_sync_enabled ||
|
if (m_settings.video_sync_enabled != old_vsync_enabled || m_settings.audio_sync_enabled != old_audio_sync_enabled ||
|
||||||
m_settings.speed_limiter_enabled != old_speed_limiter_enabled)
|
m_settings.speed_limiter_enabled != old_speed_limiter_enabled ||
|
||||||
|
m_settings.increase_timer_resolution != old_increase_timer_resolution)
|
||||||
{
|
{
|
||||||
UpdateSpeedLimiterState();
|
UpdateSpeedLimiterState();
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,8 @@ ConsoleSettingsWidget::ConsoleSettingsWidget(QtHostInterface* host_interface, QW
|
||||||
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.fastBoot, "BIOS/PatchFastBoot");
|
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.fastBoot, "BIOS/PatchFastBoot");
|
||||||
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.enableSpeedLimiter,
|
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.enableSpeedLimiter,
|
||||||
"General/SpeedLimiterEnabled");
|
"General/SpeedLimiterEnabled");
|
||||||
|
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.increaseTimerResolution,
|
||||||
|
"General/IncreaseTimerResolution");
|
||||||
SettingWidgetBinder::BindWidgetToNormalizedSetting(m_host_interface, m_ui.emulationSpeed, "General/EmulationSpeed",
|
SettingWidgetBinder::BindWidgetToNormalizedSetting(m_host_interface, m_ui.emulationSpeed, "General/EmulationSpeed",
|
||||||
100.0f);
|
100.0f);
|
||||||
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.pauseOnStart, "General/StartPaused");
|
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.pauseOnStart, "General/StartPaused");
|
||||||
|
|
|
@ -140,13 +140,20 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0" colspan="2">
|
<item row="5" column="0" colspan="2">
|
||||||
|
<widget class="QCheckBox" name="increaseTimerResolution">
|
||||||
|
<property name="text">
|
||||||
|
<string>Increase Timer Resolution</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0" colspan="2">
|
||||||
<widget class="QCheckBox" name="pauseOnStart">
|
<widget class="QCheckBox" name="pauseOnStart">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Pause On Start</string>
|
<string>Pause On Start</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="0" colspan="2">
|
<item row="7" column="0" colspan="2">
|
||||||
<widget class="QCheckBox" name="saveStateOnExit">
|
<widget class="QCheckBox" name="saveStateOnExit">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Save State On Exit</string>
|
<string>Save State On Exit</string>
|
||||||
|
|
|
@ -1166,6 +1166,7 @@ void SDLHostInterface::DrawSettingsWindow()
|
||||||
|
|
||||||
settings_changed |= ImGui::SliderFloat("##speed", &m_settings.emulation_speed, 0.25f, 5.0f);
|
settings_changed |= ImGui::SliderFloat("##speed", &m_settings.emulation_speed, 0.25f, 5.0f);
|
||||||
settings_changed |= ImGui::Checkbox("Enable Speed Limiter", &m_settings.speed_limiter_enabled);
|
settings_changed |= ImGui::Checkbox("Enable Speed Limiter", &m_settings.speed_limiter_enabled);
|
||||||
|
settings_changed |= ImGui::Checkbox("Increase Timer Resolution", &m_settings.increase_timer_resolution);
|
||||||
settings_changed |= ImGui::Checkbox("Pause On Start", &m_settings.start_paused);
|
settings_changed |= ImGui::Checkbox("Pause On Start", &m_settings.start_paused);
|
||||||
settings_changed |= ImGui::Checkbox("Save State On Exit", &m_settings.save_state_on_exit);
|
settings_changed |= ImGui::Checkbox("Save State On Exit", &m_settings.save_state_on_exit);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue