SpecialKO / SpecialK

Lovingly referred to as the Swiss Army Knife of PC gaming, Special K does a bit of everything.
https://www.special-k.info/
GNU General Public License v3.0
718 stars 45 forks source link

Delayed background framerate mode #163

Open trudnorx opened 2 months ago

trudnorx commented 2 months ago

This proposed feature would allow the background FPS limit to kick in only after the game has been in the background for a number of seconds* (e.g., 30). This would avoid issues with these games that load extremely slowly when a FPS limit is enabled, which is a problem considering that users tend to put the game in the background to not have to sit through the loading process. This would permit users to balance saving on GPU power and not running into that issue.

Alternatively, it could work based on detecting the process' disk usage and not limiting background FPS when it is still significant, though this would only eliminate part of the problem assuming part of the slowdown isn't related to disk usage.

* either cumulative background seconds since the game started or only counting since putting in the background for the last time, the former would work better for saving more power, but the latter would work better assuming the game has multiple slow loading processes (e.g., from savegame loading).

Kaldaien commented 2 months ago

Alternatively, it could work based on detecting the process' disk usage and not limiting background FPS when it is still significant, though this would only eliminate part of the problem assuming part of the slowdown isn't related to disk usage.

Sounds good on paper, and SK does monitor disk load %, but I can see this having all kinds of false positives and would prefer to avoid that.

I can implement delayed-onset background FPS limit though, as a function of the amount of time the game has been in the background. I assume that before the background framerate limit kicks in, you want the foreground limit to still apply? I ask because you're talking about loading screens after all... if you really wanted to speed that stuff up, then no limit at all would be ideal.