diff --git a/package/cream.sh b/package/cream.sh index dd096d6..f9a4b8f 100755 --- a/package/cream.sh +++ b/package/cream.sh @@ -3,13 +3,13 @@ result=$(zenity --title="Launch Options" --list "Start Game" "Edit Creamlinux se # Supported games GAME_NAMES=("Hearts Of Iron IV" "Europa Universalis IV" "Cities: Skylines" "Stellaris" "PDX Launcher (don't click play)") GAME_BINARIES=("./hoi4" "./eu4" "./Cities.x64" "./stellaris" "./dowser") -launch_game () { +function launch_game { # LD_PRELOAD doesn't support spaces, do this instead cp "$PWD/libCreamlinux.so" /tmp/libCreamlinux.so # reset backwards compatible stuff so games that DO use it don't break unset IFS # paradox launcher segfaults with creamlinux, if launching launcher, do it differently - if [ "$SELECTED_GAME" -eq "./dowser" ]; then + if [ "$SELECTED_GAME" = "./dowser" ]; then $SELECTED_GAME "$@" exit 0 fi @@ -20,6 +20,8 @@ launch_game () { export IFS="" if [ -z "$CREAM_GAME_NAME" ]; then + echo "" +else SELECTED_GAME=$CREAM_GAME_NAME launch_game fi