flathub/org.ryujinx.Ryujinx

Add gamemoderun to app files (temporary measure while upstream makes proper integration)

Opened this issue · 0 comments

This is the current launch file:

#!/bin/sh

SCRIPT_DIR=$(dirname "$(realpath "$0")")

if [ -f "$SCRIPT_DIR/Ryujinx.Headless.SDL2" ]; then
    RYUJINX_BIN="Ryujinx.Headless.SDL2"
fi

if [ -f "$SCRIPT_DIR/Ryujinx" ]; then
    RYUJINX_BIN="Ryujinx"
fi

if [ -z "$RYUJINX_BIN" ]; then
    exit 1
fi

COMMAND="env DOTNET_EnableAlternateStackCheck=1"

if command -v gamemoderun > /dev/null 2>&1; then
    COMMAND="$COMMAND gamemoderun"
fi

Notice how it can rely on the existence of gamemoderun to enable GameMode support.

https://github.com/Ryujinx/Ryujinx/issues/6732 asks for proper Feral GameMode integration and the upstream has showed interest in properly integrating the gamemode lib in the future.

In the mean time, to allow gamemode support for Flatpak users, it should be useful to ship the gamemoderun binary.