diff --git a/packages/games/emulators/lzdoom/sources/start_lzdoom.sh b/packages/games/emulators/lzdoom/sources/start_lzdoom.sh index 71b653951..af8ccdfb0 100644 --- a/packages/games/emulators/lzdoom/sources/start_lzdoom.sh +++ b/packages/games/emulators/lzdoom/sources/start_lzdoom.sh @@ -21,34 +21,26 @@ fi mkdir -p ${SAVE_DIR} -params=( - "-config" "${CONFIG}" - "-savedir" "${SAVE_DIR}" - "-width" "1152" - "-height" "1920" - "+vid_fps" "1" - "+cl_capfps" "0" - "+vid_renderer" "0" - "+vid_glswfb" "0" -) +params=" -config ${CONFIG} -savedir ${SAVE_DIR}" +params+=" -width 1152 -height 1920 +vid_fps 1 +cl_capfps 0 +vid_renderer 0 +vid_glswfb 0" # EXT can be wad, WAD, iwad, IWAD, pwad, PWAD or doom EXT=${1#*.} # If its not a simple wad (extension .doom) read the file and parse the data -if [ "${EXT}" == "doom" ]; then +if [ ${EXT} == "doom" ]; then dos2unix "${1}" while IFS== read -r key value; do - if [ "${key}" == "IWAD" ]; then - params+=("-iwad" "${value}") + if [ "$key" == "IWAD" ]; then + params+=" -iwad $value" fi - if [ "${key}" == "MOD" ]; then - params+=("-file" "${value}") + if [ "$key" == "MOD" ]; then + params+=" -file $value" fi done <"${1}" else - params+=("-iwad" "${1}") + params+=" -iwad ${1}" fi cd "${RUN_DIR}" -/usr/bin/lzdoom "${params[@]}" >/var/log/lzdoom.log 2>&1 +echo ${params} | xargs /usr/bin/lzdoom >/var/log/lzdoom.log 2>&1