Hand the frame limit to RivaTuner Statistics Server where it runs, and take it back when RTSS does not hold to it.

Where RTSS is installed and running, the frame limit from the menu goes into RTSS's profile for the game's executable
through RTSS's hooks library, loaded at run time, and the game's own pacer stands aside while RTSS has hooked the game.
Menu changes apply live, unlimited clears the limit, and closing the game (or any exit path) puts back what the profile
held, or removes a profile the game created. Each change is read back from the saved profile: without administrator
rights RTSS's profile folder cannot be written, and the game then keeps its own limiter. While RTSS limits, RTSS's own
frame counter for the game is checked against the limit; well past it for three seconds, the game takes the limiting
back for the run. The log says which limiter is in use and why, and a note under the frame-rate row says when RTSS
limits, when its profile is read-only, and when it does not hold the game to the limit. rtss = 0 and frame generation
keep RTSS out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-08 01:08:39 -05:00
parent cfc3228cc4
commit 9bb3c6c55a
13 changed files with 401 additions and 5 deletions

View File

@@ -180,6 +180,10 @@ static const char *const text_en[UI_TEXT_COUNT] = {
// the monitor's refresh rate; printf format with the rate in Hz when it is known
[UI_MENU_FPS_DISPLAY] = "Monitor rate", [UI_MENU_FPS_DISPLAY_HZ] = "Monitor rate (%.0f Hz)",
[UI_MENU_FPS_UNLIMITED] = "Unlimited",
// notes under the frame rate value: RivaTuner Statistics Server (rtss_limit.c) limits the game, or cannot
[UI_MENU_FPS_RTSS] = "limited by RivaTuner Statistics Server",
[UI_MENU_FPS_RTSS_READONLY] = "RivaTuner needs the game run as administrator",
[UI_MENU_FPS_RTSS_IGNORED] = "RivaTuner does not limit this game; the game does",
[UI_MENU_REALTIME] = "Game speed follows the clock",
[UI_MENU_REALTIME_DESC] = "Steps the game by real time, so a slow frame does not slow the game down.",
[UI_MENU_CLOTH_REALTIME] = "Cloth on the clock",
@@ -691,6 +695,9 @@ static const char *const text_ru[UI_TEXT_COUNT] = {
[UI_MENU_FPS_60] = "60 FPS", [UI_MENU_FPS_90] = "90 FPS", [UI_MENU_FPS_120] = "120 FPS", [UI_MENU_FPS_144] = "144 FPS",
[UI_MENU_FPS_DISPLAY] = "Как у монитора", [UI_MENU_FPS_DISPLAY_HZ] = "Как у монитора (%.0f Гц)",
[UI_MENU_FPS_UNLIMITED] = "Без ограничения",
[UI_MENU_FPS_RTSS] = "ограничивает RivaTuner Statistics Server",
[UI_MENU_FPS_RTSS_READONLY] = "RivaTuner нужен запуск игры от администратора",
[UI_MENU_FPS_RTSS_IGNORED] = "RivaTuner не ограничивает эту игру; ограничивает игра",
[UI_MENU_REALTIME] = "Скорость игры по часам",
[UI_MENU_REALTIME_DESC] = "Игра идёт по реальному времени, медленный кадр её не замедляет.",
[UI_MENU_CLOTH_REALTIME] = "Ткань по часам",
@@ -1132,6 +1139,9 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = {
"assim pode parar de vez.",
[UI_MENU_FPS_DISPLAY] = "Taxa do monitor", [UI_MENU_FPS_DISPLAY_HZ] = "Taxa do monitor (%.0f Hz)",
[UI_MENU_FPS_UNLIMITED] = "Sem limite",
[UI_MENU_FPS_RTSS] = "limitado pelo RivaTuner Statistics Server",
[UI_MENU_FPS_RTSS_READONLY] = "o RivaTuner pede o jogo como administrador",
[UI_MENU_FPS_RTSS_IGNORED] = "o RivaTuner não limita este jogo; o jogo limita",
[UI_MENU_REALTIME] = "Velocidade do jogo pelo relógio",
[UI_MENU_REALTIME_DESC] = "Avança o jogo pelo tempo real, para que um quadro lento não deixe o jogo mais lento.",
[UI_MENU_CLOTH_REALTIME] = "Tecidos pelo relógio",
@@ -1673,6 +1683,9 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = {
[UI_MENU_FPS_DISPLAY] = "显示器刷新率",
[UI_MENU_FPS_DISPLAY_HZ] = "显示器刷新率(%.0f Hz)",
[UI_MENU_FPS_UNLIMITED] = "不限制",
[UI_MENU_FPS_RTSS] = "由 RivaTuner Statistics Server 限制",
[UI_MENU_FPS_RTSS_READONLY] = "RivaTuner 需要以管理员身份运行游戏",
[UI_MENU_FPS_RTSS_IGNORED] = "RivaTuner 未限制本游戏;由游戏自行限制",
[UI_MENU_REALTIME] = "游戏速度跟随时钟",
[UI_MENU_REALTIME_DESC] = "按真实时间推进游戏,帧率低时游戏速度也不会变慢。",
[UI_MENU_CLOTH_REALTIME] = "布料跟随时钟",