mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-08 04:25:37 +00:00
Settings: Remove 'Increase Timer Resolution' option
It's no longer needed since I switched to high-resolution waitable timers, which are supported on Win10 1803+.
This commit is contained in:
parent
fee5f760ad
commit
4132b5ef3d
@ -135,7 +135,7 @@ void Timer::SleepUntil(Value value, bool exact)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// falling back to sleep... bad.
|
// falling back to sleep... bad.
|
||||||
Sleep(static_cast<DWORD>(static_cast<u64>(diff) / 1000000));
|
Sleep(static_cast<DWORD>(ConvertValueToMilliseconds(diff)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5121,12 +5121,6 @@ void FullscreenUI::DrawAdvancedSettingsPage()
|
|||||||
FSUI_CSTR("Enable debugging when supported by the host's renderer API. Only for developer use."),
|
FSUI_CSTR("Enable debugging when supported by the host's renderer API. Only for developer use."),
|
||||||
"GPU", "UseDebugDevice", false);
|
"GPU", "UseDebugDevice", false);
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
DrawToggleSetting(bsi, FSUI_CSTR("Increase Timer Resolution"),
|
|
||||||
FSUI_CSTR("Enables more precise frame pacing at the cost of battery life."), "Main",
|
|
||||||
"IncreaseTimerResolution", true);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
DrawToggleSetting(bsi, FSUI_CSTR("Allow Booting Without SBI File"),
|
DrawToggleSetting(bsi, FSUI_CSTR("Allow Booting Without SBI File"),
|
||||||
FSUI_CSTR("Allows loading protected games without subchannel information."), "CDROM",
|
FSUI_CSTR("Allows loading protected games without subchannel information."), "CDROM",
|
||||||
"AllowBootingWithoutSBIFile", false);
|
"AllowBootingWithoutSBIFile", false);
|
||||||
@ -7259,9 +7253,6 @@ TRANSLATE_NOOP("FullscreenUI", "Contributor List");
|
|||||||
TRANSLATE_NOOP("FullscreenUI", "Controller Port {}");
|
TRANSLATE_NOOP("FullscreenUI", "Controller Port {}");
|
||||||
TRANSLATE_NOOP("FullscreenUI", "Controller Port {} Macros");
|
TRANSLATE_NOOP("FullscreenUI", "Controller Port {} Macros");
|
||||||
TRANSLATE_NOOP("FullscreenUI", "Controller Port {} Settings");
|
TRANSLATE_NOOP("FullscreenUI", "Controller Port {} Settings");
|
||||||
TRANSLATE_NOOP("FullscreenUI", "Controller Port {}{}");
|
|
||||||
TRANSLATE_NOOP("FullscreenUI", "Controller Port {}{} Macros");
|
|
||||||
TRANSLATE_NOOP("FullscreenUI", "Controller Port {}{} Settings");
|
|
||||||
TRANSLATE_NOOP("FullscreenUI", "Controller Settings");
|
TRANSLATE_NOOP("FullscreenUI", "Controller Settings");
|
||||||
TRANSLATE_NOOP("FullscreenUI", "Controller Type");
|
TRANSLATE_NOOP("FullscreenUI", "Controller Type");
|
||||||
TRANSLATE_NOOP("FullscreenUI", "Controller settings reset to default.");
|
TRANSLATE_NOOP("FullscreenUI", "Controller settings reset to default.");
|
||||||
@ -7354,7 +7345,6 @@ TRANSLATE_NOOP("FullscreenUI", "Enable/Disable the Player LED on DualSense contr
|
|||||||
TRANSLATE_NOOP("FullscreenUI", "Enables alignment and bus exceptions. Not needed for any known games.");
|
TRANSLATE_NOOP("FullscreenUI", "Enables alignment and bus exceptions. Not needed for any known games.");
|
||||||
TRANSLATE_NOOP("FullscreenUI", "Enables an additional 6MB of RAM to obtain a total of 2+6 = 8MB, usually present on dev consoles.");
|
TRANSLATE_NOOP("FullscreenUI", "Enables an additional 6MB of RAM to obtain a total of 2+6 = 8MB, usually present on dev consoles.");
|
||||||
TRANSLATE_NOOP("FullscreenUI", "Enables an additional three controller slots on each port. Not supported in all games.");
|
TRANSLATE_NOOP("FullscreenUI", "Enables an additional three controller slots on each port. Not supported in all games.");
|
||||||
TRANSLATE_NOOP("FullscreenUI", "Enables more precise frame pacing at the cost of battery life.");
|
|
||||||
TRANSLATE_NOOP("FullscreenUI", "Enables smooth scrolling of menus in Big Picture UI.");
|
TRANSLATE_NOOP("FullscreenUI", "Enables smooth scrolling of menus in Big Picture UI.");
|
||||||
TRANSLATE_NOOP("FullscreenUI", "Enables the older, less accurate MDEC decoding routines. May be required for old replacement backgrounds to match/load.");
|
TRANSLATE_NOOP("FullscreenUI", "Enables the older, less accurate MDEC decoding routines. May be required for old replacement backgrounds to match/load.");
|
||||||
TRANSLATE_NOOP("FullscreenUI", "Enables the replacement of background textures in supported games.");
|
TRANSLATE_NOOP("FullscreenUI", "Enables the replacement of background textures in supported games.");
|
||||||
@ -7427,7 +7417,6 @@ TRANSLATE_NOOP("FullscreenUI", "How many saves will be kept for rewinding. Highe
|
|||||||
TRANSLATE_NOOP("FullscreenUI", "How often a rewind state will be created. Higher frequencies have greater system requirements.");
|
TRANSLATE_NOOP("FullscreenUI", "How often a rewind state will be created. Higher frequencies have greater system requirements.");
|
||||||
TRANSLATE_NOOP("FullscreenUI", "Identifies any new files added to the game directories.");
|
TRANSLATE_NOOP("FullscreenUI", "Identifies any new files added to the game directories.");
|
||||||
TRANSLATE_NOOP("FullscreenUI", "If not enabled, the current post processing chain will be ignored.");
|
TRANSLATE_NOOP("FullscreenUI", "If not enabled, the current post processing chain will be ignored.");
|
||||||
TRANSLATE_NOOP("FullscreenUI", "Increase Timer Resolution");
|
|
||||||
TRANSLATE_NOOP("FullscreenUI", "Increases the field of view from 4:3 to the chosen display aspect ratio in 3D games.");
|
TRANSLATE_NOOP("FullscreenUI", "Increases the field of view from 4:3 to the chosen display aspect ratio in 3D games.");
|
||||||
TRANSLATE_NOOP("FullscreenUI", "Increases the precision of polygon culling, reducing the number of holes in geometry.");
|
TRANSLATE_NOOP("FullscreenUI", "Increases the precision of polygon culling, reducing the number of holes in geometry.");
|
||||||
TRANSLATE_NOOP("FullscreenUI", "Infinite/Instantaneous");
|
TRANSLATE_NOOP("FullscreenUI", "Infinite/Instantaneous");
|
||||||
|
@ -148,7 +148,6 @@ void Settings::Load(SettingsInterface& si, SettingsInterface& controller_si)
|
|||||||
fast_forward_speed = si.GetFloatValue("Main", "FastForwardSpeed", 0.0f);
|
fast_forward_speed = si.GetFloatValue("Main", "FastForwardSpeed", 0.0f);
|
||||||
turbo_speed = si.GetFloatValue("Main", "TurboSpeed", 0.0f);
|
turbo_speed = si.GetFloatValue("Main", "TurboSpeed", 0.0f);
|
||||||
sync_to_host_refresh_rate = si.GetBoolValue("Main", "SyncToHostRefreshRate", false);
|
sync_to_host_refresh_rate = si.GetBoolValue("Main", "SyncToHostRefreshRate", false);
|
||||||
increase_timer_resolution = si.GetBoolValue("Main", "IncreaseTimerResolution", true);
|
|
||||||
inhibit_screensaver = si.GetBoolValue("Main", "InhibitScreensaver", true);
|
inhibit_screensaver = si.GetBoolValue("Main", "InhibitScreensaver", true);
|
||||||
start_paused = si.GetBoolValue("Main", "StartPaused", false);
|
start_paused = si.GetBoolValue("Main", "StartPaused", false);
|
||||||
start_fullscreen = si.GetBoolValue("Main", "StartFullscreen", false);
|
start_fullscreen = si.GetBoolValue("Main", "StartFullscreen", false);
|
||||||
@ -464,7 +463,6 @@ void Settings::Save(SettingsInterface& si, bool ignore_base) const
|
|||||||
if (!ignore_base)
|
if (!ignore_base)
|
||||||
{
|
{
|
||||||
si.SetBoolValue("Main", "SyncToHostRefreshRate", sync_to_host_refresh_rate);
|
si.SetBoolValue("Main", "SyncToHostRefreshRate", sync_to_host_refresh_rate);
|
||||||
si.SetBoolValue("Main", "IncreaseTimerResolution", increase_timer_resolution);
|
|
||||||
si.SetBoolValue("Main", "InhibitScreensaver", inhibit_screensaver);
|
si.SetBoolValue("Main", "InhibitScreensaver", inhibit_screensaver);
|
||||||
si.SetBoolValue("Main", "StartPaused", start_paused);
|
si.SetBoolValue("Main", "StartPaused", start_paused);
|
||||||
si.SetBoolValue("Main", "StartFullscreen", start_fullscreen);
|
si.SetBoolValue("Main", "StartFullscreen", start_fullscreen);
|
||||||
|
@ -77,7 +77,6 @@ struct Settings
|
|||||||
float fast_forward_speed = 0.0f;
|
float fast_forward_speed = 0.0f;
|
||||||
float turbo_speed = 0.0f;
|
float turbo_speed = 0.0f;
|
||||||
bool sync_to_host_refresh_rate : 1 = false;
|
bool sync_to_host_refresh_rate : 1 = false;
|
||||||
bool increase_timer_resolution : 1 = true;
|
|
||||||
bool inhibit_screensaver : 1 = true;
|
bool inhibit_screensaver : 1 = true;
|
||||||
bool start_paused : 1 = false;
|
bool start_paused : 1 = false;
|
||||||
bool start_fullscreen : 1 = false;
|
bool start_fullscreen : 1 = false;
|
||||||
|
@ -85,8 +85,6 @@ LOG_CHANNEL(System);
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include "common/windows_headers.h"
|
#include "common/windows_headers.h"
|
||||||
#include <Objbase.h>
|
#include <Objbase.h>
|
||||||
#include <mmsystem.h>
|
|
||||||
#include <objbase.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __ANDROID__
|
#ifndef __ANDROID__
|
||||||
@ -223,8 +221,6 @@ static bool DoRunahead();
|
|||||||
|
|
||||||
static void UpdateSessionTime(const std::string& prev_serial);
|
static void UpdateSessionTime(const std::string& prev_serial);
|
||||||
|
|
||||||
static void SetTimerResolutionIncreased(bool enabled);
|
|
||||||
|
|
||||||
#ifdef ENABLE_DISCORD_PRESENCE
|
#ifdef ENABLE_DISCORD_PRESENCE
|
||||||
static void InitializeDiscordPresence();
|
static void InitializeDiscordPresence();
|
||||||
static void ShutdownDiscordPresence();
|
static void ShutdownDiscordPresence();
|
||||||
@ -1969,8 +1965,6 @@ void System::DestroySystem()
|
|||||||
if (g_settings.inhibit_screensaver)
|
if (g_settings.inhibit_screensaver)
|
||||||
PlatformMisc::ResumeScreensaver();
|
PlatformMisc::ResumeScreensaver();
|
||||||
|
|
||||||
SetTimerResolutionIncreased(false);
|
|
||||||
|
|
||||||
s_cpu_thread_usage = {};
|
s_cpu_thread_usage = {};
|
||||||
|
|
||||||
ClearMemorySaveStates();
|
ClearMemorySaveStates();
|
||||||
@ -2323,10 +2317,14 @@ void System::Throttle(Common::Timer::Value current_time)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
DEV_LOG("Asked for {:.2f} ms, slept for {:.2f} ms, {:.2f} ms late",
|
const Common::Timer::Value time_after_sleep = Common::Timer::GetCurrentValue();
|
||||||
|
DEV_LOG("Asked for {:.2f} ms, slept for {:.2f} ms, {:.2f} ms {}",
|
||||||
Common::Timer::ConvertValueToMilliseconds(s_next_frame_time - current_time),
|
Common::Timer::ConvertValueToMilliseconds(s_next_frame_time - current_time),
|
||||||
Common::Timer::ConvertValueToMilliseconds(Common::Timer::GetCurrentValue() - current_time),
|
Common::Timer::ConvertValueToMilliseconds(time_after_sleep - current_time),
|
||||||
Common::Timer::ConvertValueToMilliseconds(Common::Timer::GetCurrentValue() - s_next_frame_time));
|
Common::Timer::ConvertValueToMilliseconds((time_after_sleep < s_next_frame_time) ?
|
||||||
|
(s_next_frame_time - time_after_sleep) :
|
||||||
|
(time_after_sleep - s_next_frame_time)),
|
||||||
|
(time_after_sleep < s_next_frame_time) ? "early" : "late");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
s_next_frame_time += s_frame_period;
|
s_next_frame_time += s_frame_period;
|
||||||
@ -3437,9 +3435,6 @@ void System::UpdateSpeedLimiterState()
|
|||||||
ResetThrottler();
|
ResetThrottler();
|
||||||
UpdateDisplayVSync();
|
UpdateDisplayVSync();
|
||||||
|
|
||||||
if (g_settings.increase_timer_resolution)
|
|
||||||
SetTimerResolutionIncreased(s_throttler_enabled);
|
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
// To get any resemblence of consistent frame times on MacOS, we need to tell the scheduler how often we need to run.
|
// To get any resemblence of consistent frame times on MacOS, we need to tell the scheduler how often we need to run.
|
||||||
// Assume a maximum of 7ms for running a frame. It'll be much lower than that, Apple Silicon is fast.
|
// Assume a maximum of 7ms for running a frame. It'll be much lower than that, Apple Silicon is fast.
|
||||||
@ -4468,7 +4463,6 @@ void System::CheckForSettingsChanges(const Settings& old_settings)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (g_settings.audio_backend != old_settings.audio_backend ||
|
if (g_settings.audio_backend != old_settings.audio_backend ||
|
||||||
g_settings.increase_timer_resolution != old_settings.increase_timer_resolution ||
|
|
||||||
g_settings.emulation_speed != old_settings.emulation_speed ||
|
g_settings.emulation_speed != old_settings.emulation_speed ||
|
||||||
g_settings.fast_forward_speed != old_settings.fast_forward_speed ||
|
g_settings.fast_forward_speed != old_settings.fast_forward_speed ||
|
||||||
g_settings.display_optimal_frame_pacing != old_settings.display_optimal_frame_pacing ||
|
g_settings.display_optimal_frame_pacing != old_settings.display_optimal_frame_pacing ||
|
||||||
@ -5841,22 +5835,6 @@ void System::InvalidateDisplay()
|
|||||||
g_gpu->RestoreDeviceContext();
|
g_gpu->RestoreDeviceContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
void System::SetTimerResolutionIncreased(bool enabled)
|
|
||||||
{
|
|
||||||
#if defined(_WIN32)
|
|
||||||
static bool current_state = false;
|
|
||||||
if (current_state == enabled)
|
|
||||||
return;
|
|
||||||
|
|
||||||
current_state = enabled;
|
|
||||||
|
|
||||||
if (enabled)
|
|
||||||
timeBeginPeriod(1);
|
|
||||||
else
|
|
||||||
timeEndPeriod(1);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void System::UpdateSessionTime(const std::string& prev_serial)
|
void System::UpdateSessionTime(const std::string& prev_serial)
|
||||||
{
|
{
|
||||||
const u64 ctime = Common::Timer::GetCurrentValue();
|
const u64 ctime = Common::Timer::GetCurrentValue();
|
||||||
|
@ -218,8 +218,6 @@ void AdvancedSettingsWidget::addTweakOptions()
|
|||||||
|
|
||||||
addBooleanTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Apply Compatibility Settings"), "Main",
|
addBooleanTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Apply Compatibility Settings"), "Main",
|
||||||
"ApplyCompatibilitySettings", true);
|
"ApplyCompatibilitySettings", true);
|
||||||
addBooleanTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Increase Timer Resolution"), "Main",
|
|
||||||
"IncreaseTimerResolution", true);
|
|
||||||
addBooleanTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Load Devices From Save States"), "Main",
|
addBooleanTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Load Devices From Save States"), "Main",
|
||||||
"LoadDevicesFromSaveStates", false);
|
"LoadDevicesFromSaveStates", false);
|
||||||
addChoiceTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Save State Compression"), "Main", "SaveStateCompression",
|
addChoiceTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Save State Compression"), "Main", "SaveStateCompression",
|
||||||
@ -281,7 +279,6 @@ void AdvancedSettingsWidget::onResetToDefaultClicked()
|
|||||||
|
|
||||||
setBooleanTweakOption(m_ui.tweakOptionTable, i++, true); // Apply Game Settings
|
setBooleanTweakOption(m_ui.tweakOptionTable, i++, true); // Apply Game Settings
|
||||||
setBooleanTweakOption(m_ui.tweakOptionTable, i++, true); // Apply compatibility settings
|
setBooleanTweakOption(m_ui.tweakOptionTable, i++, true); // Apply compatibility settings
|
||||||
setBooleanTweakOption(m_ui.tweakOptionTable, i++, true); // Increase Timer Resolution
|
|
||||||
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Load Devices From Save States
|
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Load Devices From Save States
|
||||||
setChoiceTweakOption(m_ui.tweakOptionTable, i++,
|
setChoiceTweakOption(m_ui.tweakOptionTable, i++,
|
||||||
Settings::DEFAULT_SAVE_STATE_COMPRESSION_MODE); // Save State Compression
|
Settings::DEFAULT_SAVE_STATE_COMPRESSION_MODE); // Save State Compression
|
||||||
@ -312,7 +309,6 @@ void AdvancedSettingsWidget::onResetToDefaultClicked()
|
|||||||
// for per-game it's easier to just clear and recreate
|
// for per-game it's easier to just clear and recreate
|
||||||
SettingsInterface* sif = m_dialog->getSettingsInterface();
|
SettingsInterface* sif = m_dialog->getSettingsInterface();
|
||||||
sif->DeleteValue("Main", "ApplyCompatibilitySettings");
|
sif->DeleteValue("Main", "ApplyCompatibilitySettings");
|
||||||
sif->DeleteValue("Main", "IncreaseTimerResolution");
|
|
||||||
sif->DeleteValue("Main", "LoadDevicesFromSaveStates");
|
sif->DeleteValue("Main", "LoadDevicesFromSaveStates");
|
||||||
sif->DeleteValue("Main", "CompressSaveStates");
|
sif->DeleteValue("Main", "CompressSaveStates");
|
||||||
sif->DeleteValue("Display", "ActiveStartOffset");
|
sif->DeleteValue("Display", "ActiveStartOffset");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user