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)
|
||||
{
|
||||
const bool old_increase_timer_resolution = m_settings.increase_timer_resolution;
|
||||
const float old_emulation_speed = m_settings.emulation_speed;
|
||||
const CPUExecutionMode old_cpu_execution_mode = m_settings.cpu_execution_mode;
|
||||
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 ||
|
||||
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();
|
||||
}
|
||||
|
|
|
@ -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.enableSpeedLimiter,
|
||||
"General/SpeedLimiterEnabled");
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.increaseTimerResolution,
|
||||
"General/IncreaseTimerResolution");
|
||||
SettingWidgetBinder::BindWidgetToNormalizedSetting(m_host_interface, m_ui.emulationSpeed, "General/EmulationSpeed",
|
||||
100.0f);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.pauseOnStart, "General/StartPaused");
|
||||
|
|
|
@ -140,13 +140,20 @@
|
|||
</widget>
|
||||
</item>
|
||||
<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">
|
||||
<property name="text">
|
||||
<string>Pause On Start</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="2">
|
||||
<item row="7" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="saveStateOnExit">
|
||||
<property name="text">
|
||||
<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::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("Save State On Exit", &m_settings.save_state_on_exit);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue