mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-11-27 19:30:50 +01:00
Linux: Use gamemode if it is available when using Ryujinx.sh. (#4938)
* Linux: Detect if gamemode is installed and start it when launching Ryujinx. When using the Ryujinx.sh script to start the emulator check if gamemoderun exists and use it if it does. Gamemode mode on Linux changes some system settings to make performance during gaming more consistent mainly by changing the CPU governor to performance. https://github.com/FeralInteractive/gamemode * Removed if statement. * Fix due to wrong assumption about the output of which. Checks if the which output contains a no match response, otherwise use gamemoderun. Using a case statement because it makes substring matching possible in sh and also it turns out that adding an empty string after env throws an error because env attempts to parse it as a paramater. * Missed a couple semicolons. * Different approach for checking if gamemode is available. Should hopefully work across all implementations of which. * Remove unneeded which command. * Change code to keep launch command to a single line.
This commit is contained in:
parent
dc0dbc50ab
commit
7bc9d0cdad
@ -11,4 +11,10 @@ if [ -f "$SCRIPT_DIR/Ryujinx.Headless.SDL2" ]; then
|
||||
RYUJINX_BIN="Ryujinx.Headless.SDL2"
|
||||
fi
|
||||
|
||||
env DOTNET_EnableAlternateStackCheck=1 "$SCRIPT_DIR/$RYUJINX_BIN" "$@"
|
||||
COMMAND="env DOTNET_EnableAlternateStackCheck=1"
|
||||
|
||||
if command -v gamemoderun > /dev/null 2>&1; then
|
||||
COMMAND="$COMMAND gamemoderun"
|
||||
fi
|
||||
|
||||
$COMMAND "$SCRIPT_DIR/$RYUJINX_BIN" "$@"
|
||||
|
Loading…
Reference in New Issue
Block a user