Fixed MangoHud

This commit is contained in:
Boria138
2024-02-22 20:31:52 +06:00
parent 9bc78beae0
commit 3388c2479c
3 changed files with 18 additions and 18 deletions

View File

@@ -793,8 +793,14 @@ export LSPCI_VGA="$(lspci -k | grep -E 'VGA|3D' | tr -d '\n')"
if command -v xrandr &>/dev/null ; then
try_remove_file "${PORT_WINE_TMP_PATH}/tmp_screen_configuration"
export PW_SCREEN_RESOLUTION="$(xrandr | sed -rn 's/^.*primary.* ([0-9]+x[0-9]+).*$/\1/p')"
export PW_SCREEN_PRIMARY="$(xrandr | grep "primary" | awk '{print $1}')"
if [[ $(xrandr | grep " connected" | wc -l) == "1" ]]; then
export PW_SCREEN_RESOLUTION="$(xrandr | sed -rn 's/^.* connected.* ([0-9]+x[0-9]+).*$/\1/p')"
export PW_SCREEN_PRIMARY="$(xrandr | grep " connected" | awk '{print $1}')"
else
export PW_SCREEN_RESOLUTION="$(xrandr | sed -rn 's/^.*primary.* ([0-9]+x[0-9]+).*$/\1/p')"
export PW_SCREEN_PRIMARY="$(xrandr | grep "primary" | awk '{print $1}')"
fi
print_var PW_SCREEN_RESOLUTION PW_SCREEN_PRIMARY
else
print_error "xrandr - not found!"