Hermes 0.7.0
Linux game streaming host
Loading...
Searching...
No Matches
frame_limit_env.h File Reference

Environment that caps an application's frame rate at the stream's. More...

#include <string>
#include <string_view>
#include <utility>
#include <vector>
Include dependency graph for frame_limit_env.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::string proc::frame_limit::mangohud_config (std::string_view existing, int fps)
std::vector< std::pair< std::string, std::string > > proc::frame_limit::environment (int fps, std::string_view existing_mangohud_config)

Detailed Description

Environment that caps an application's frame rate at the stream's.

Definition in file frame_limit_env.h.

Function Documentation

◆ environment()

std::vector< std::pair< std::string, std::string > > proc::frame_limit::environment ( int fps,
std::string_view existing_mangohud_config )
inline

Variables that cap an application at the stream's frame rate, with no extra software required: DXVK (D3D8-11 under Proton) and VKD3D-Proton (D3D12) read DXVK_FRAME_RATE and VKD3D_FRAME_RATE in the builds that keep their limiter. MangoHud, where the user already enables it, reads fps_limit from MANGOHUD_CONFIG; this never sets MANGOHUD, so it neither turns MangoHud on nor shows its overlay.

Parameters
fpsThe stream's frame rate; 0 or less means no limit.
existing_mangohud_configThe MANGOHUD_CONFIG already set, or empty.
Returns
Name and value pairs to set; empty when there is no limit.

Definition at line 60 of file frame_limit_env.h.

◆ mangohud_config()

std::string proc::frame_limit::mangohud_config ( std::string_view existing,
int fps )
inline

MANGOHUD_CONFIG with the stream's frame rate as fps_limit.

MangoHud reads only MANGOHUD_CONFIG when it is set, unless its first option is read_cfg. With no MANGOHUD_CONFIG, start with read_cfg so the user's MangoHud.conf still applies. With one, keep it as it is, read_cfg or not, and replace only its fps_limit.

Parameters
existingThe MANGOHUD_CONFIG already in the environment, or empty.
fpsThe stream's frame rate.

Definition at line 25 of file frame_limit_env.h.