This can fix a lot of performance issues, like audio crackling and frame
time spikes. This requires the GameMode package to be installed. See:
https://github.com/FeralInteractive/gamemode
This commit adds a "Game Mode" bool option to the "Power
Management" and "Latency" settings sections, and it can be toggled
on/off without restarting RA.
The actual toggling of game mode happens in a new frontend platform
interface function. Perhaps this will become useful for other platforms
that provide some equivalent of Linux GameMode.
Since the GameMode ABI is fixed, and the API comes as a single,
header-only file with no actual deps, we simply bundle the header
(deps/feralgamemode/gamemode_client.h.) That way, all Linux builds will
have support for GameMode regardless of whether the GameMode development
package is installed or not.
Setting UNIX_CWD_ENV to 1 when compiling with the unix platform will make
the base path for the env the cwd. This is to be able to match the behavior on
Windows.
We are assuming that device has its backlight device symlinked to /sys/class/backlight/backlight so this should be stated.
Additionally any hardcoding should be disallowed and the symlink should be always used.
This addresses 2 issues:
1. Input controllers report battery supplies.
That causes wrong charging status or capacities if they report percentages instead of levels.
Such supplies normally report scope attributes that report Unknown or Device type of power supply.
If reported value is System or the attribute is missing, it's considered a System supply and used.
2. Various systems have backup batteries.
That causes the wrong capacity to be reported depending on order of node creation.
This is addressed by keeping track of these and calculating an average.
when calling the frontend environment get callback - we want to
look at the 'default' directories, and then if they don't yet exist,
auto-create them so we can store files in them.
ANativeWindow getWidth/Height does not detect any changes when using
Vulkan, so use the old onContentRectChanged callback to get notified
when size changed. Use those values instead when figuring out how large
swapchain to create.
Tested trivially on Galaxy S9+ Exynos model.