]> git.xonotic.org Git - xonotic/xonotic.git/commitdiff
MSYS2: fix dedicated servers not accepting input in the shell console. It requires... terencehill/winpty
authorterencehill <piuntn@gmail.com>
Tue, 29 Aug 2017 12:02:31 +0000 (14:02 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 29 Aug 2017 12:02:31 +0000 (14:02 +0200)
misc/tools/all/xonotic.subr

index b27dcaf48c88bfed8857aab6987358c2e1843262..9ec0c4a067b076d44981566b8abda2881a701ba6 100644 (file)
@@ -342,7 +342,15 @@ case "$cmd" in
                if [ x"$USE_RLWRAP" != x"no" ] && which rlwrap >/dev/null 2>&1; then
                        set -- rlwrap -A -g '^quit' -q "\"" -s 10000 -S ']' -w 100 "$@"
                fi
+
+               # winpty fixes dedicated servers not accepting input in the shell console
+               # sadly for some reason it doesn't work for non-dedicated servers
+               if [ -n "$WE_HATE_OUR_USERS" ] && [ x"$client" == x"-dedicated" ] && which winpty >/dev/null 2>&1; then
+                       set -- winpty "$@"
+               fi
+
                rm -f xonotic.core
+
                verbose measure_time "$@" || true
                if [ -f xonotic.core ]; then
                        if yesno "The program has CRASHED. Do you want to examine the core dump?"; then