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