From 95c4912d58a535de4f5c03a2e380bdd39a543c12 Mon Sep 17 00:00:00 2001 From: lasers Date: Sat, 10 Feb 2024 17:57:23 -0600 Subject: [PATCH] Linux: Reorder available executables in Ryujinx.sh (#6171) * Avoid Ryujinx.Headless.SDL2 as a last resort in Ryujinx.desktop when you have more than one executable installed. --- distribution/linux/Ryujinx.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/distribution/linux/Ryujinx.sh b/distribution/linux/Ryujinx.sh index a80cdcaec3..6cce4d213c 100755 --- a/distribution/linux/Ryujinx.sh +++ b/distribution/linux/Ryujinx.sh @@ -1,14 +1,21 @@ #!/bin/sh SCRIPT_DIR=$(dirname "$(realpath "$0")") -RYUJINX_BIN="Ryujinx" + +if [ -f "$SCRIPT_DIR/Ryujinx.Headless.SDL2" ]; then + RYUJINX_BIN="Ryujinx.Headless.SDL2" +fi if [ -f "$SCRIPT_DIR/Ryujinx.Ava" ]; then RYUJINX_BIN="Ryujinx.Ava" fi -if [ -f "$SCRIPT_DIR/Ryujinx.Headless.SDL2" ]; then - RYUJINX_BIN="Ryujinx.Headless.SDL2" +if [ -f "$SCRIPT_DIR/Ryujinx" ]; then + RYUJINX_BIN="Ryujinx" +fi + +if [ -z "$RYUJINX_BIN" ]; then + exit 1 fi COMMAND="env DOTNET_EnableAlternateStackCheck=1" @@ -17,4 +24,4 @@ if command -v gamemoderun > /dev/null 2>&1; then COMMAND="$COMMAND gamemoderun" fi -$COMMAND "$SCRIPT_DIR/$RYUJINX_BIN" "$@" +exec $COMMAND "$SCRIPT_DIR/$RYUJINX_BIN" "$@"