[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

+1 -1
View File
@@ -437,7 +437,7 @@ void DrawFPS(UIContext *ctx, const Bounds &bounds) {
char fpsbuf[256]{};
if (g_Config.iShowStatusFlags == ((int)ShowStatusFlags::FPS_COUNTER | (int)ShowStatusFlags::SPEED_COUNTER)) {
snprintf(fpsbuf, sizeof(fpsbuf), "%0.0f/%0.0f (%0.1f%%)", actual_fps, fps, vps / (59.94f / 100.0f));
snprintf(fpsbuf, sizeof(fpsbuf), "%0.0f/%0.0f (%0.1f%%)", actual_fps, fps, vps / (g_Config.iDisplayRefreshRate / 100.0f));
} else {
if (g_Config.iShowStatusFlags & (int)ShowStatusFlags::FPS_COUNTER) {
snprintf(fpsbuf, sizeof(fpsbuf), "FPS: %0.1f", actual_fps);