From 1052425e70fc9b98aaf6943d113d351a0d5a3155 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sun, 15 Dec 2024 20:37:36 -0500 Subject: [PATCH] Add support for fex-emu to launch games. --- linux-game-manager.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/linux-game-manager.sh b/linux-game-manager.sh index d0f8258..0cf4437 100755 --- a/linux-game-manager.sh +++ b/linux-game-manager.sh @@ -71,6 +71,9 @@ check_update() { # Check architecture compatibility check_architecture() { + if command -v FEXLoader &> /dev/null ; then + return + fi local architecture="$(uname -m)" for i in "$@" ; do if [[ "${architecture}" == "$i" ]]; then @@ -541,7 +544,13 @@ game_launcher() { ;; *) pushd "${game%/*}" - exec ${game} + if file "${game##*/}" | grep -q "ELF.*x86-64"; then + if [[ "$(uname -m)" != "x86_64" ]]; then + exec FEXLoader -- ${game} + else + exec ${game} + fi + fi ;; esac exit 0 @@ -621,10 +630,11 @@ while getopts "${args}" i ; do R) redownload="true" ;; r) game_removal ;; t) + gameCount=$(find .install -type f -iname "*.sh" | wc -l) dialog --backtitle "Linux Game Manager" \ - --infobox "There are currently ${#gameList[@]} games available." -1 -1 + --infobox "There are currently ${gameCount} games available." -1 -1 exit 0 - ;; + ;; u) game_update ;; esac done