Add a --max-fps command-line argument to set a FPS limit

This allows limiting framerate on any project, which is useful to
reduce power usage and latency with certain setups (such as VRR displays).

This is particularly useful in projects that do not expose a setting to change
the FPS limit. While external FPS limiters can be used, they can be cumbersome
to set up and result in increased input lag compared to a built-in FPS limiter.
This commit is contained in:
Hugo Locurcio
2023-06-08 19:33:10 +02:00
parent da81ca62a5
commit 4cab77094a
6 changed files with 25 additions and 2 deletions

View File

@@ -105,8 +105,11 @@ Show collisions shapes when running the scene.
\fB\-\-debug\-navigation\fR
Show navigation polygons when running the scene.
.TP
\fB\-\-max\-fps\fR <fps>
Set a maximum number of frames per second rendered (can be used to limit power usage). A value of 0 results in unlimited framerate.
.TP
\fB\-\-frame\-delay\fR <ms>
Simulate high CPU load (delay each frame by <ms> milliseconds).
Simulate high CPU load (delay each frame by <ms> milliseconds). Do not use as a FPS limiter; use --max-fps instead.
.TP
\fB\-\-time\-scale\fR <scale>
Force time scale (higher values are faster, 1.0 is normal speed).