[Feature] Option to override the display refresh rate

This adds a per-game graphics option, `DisplayRefreshRate`, to override the display refresh rate.

It defaults to 60 Hz, and is located in Dev tools.

Games using variable timesteps benefit from higher refresh rates.

Closes #19319
This commit is contained in:
Nabile Rahmani committed 2024-07-13 15:04:20 +02:00
1 parent 630cae9616
commit 7af15c73bc
8 files changed
+15 -7

No files matched your search

+3
View File
@@ -1888,6 +1888,9 @@ void DeveloperToolsScreen::CreateViews() {
ffMode->SetEnabledFunc([]() { return !g_Config.bVSync; });
ffMode->HideChoice(1); // not used
auto displayRefreshRate = list->Add(new PopupSliderChoice(&g_Config.iDisplayRefreshRate, 60, 1000, 60, dev->T("Display refresh rate"), 1, screenManager()));
displayRefreshRate->SetFormat(dev->T("%d Hz"));
Draw::DrawContext *draw = screenManager()->getDrawContext();
list->Add(new ItemHeader(dev->T("Ubershaders")));