improved refresh_rate fix, now actually works on OS X...

This commit is contained in:
Andrew Titmuss 2016-06-15 20:18:57 +10:00
parent 3b4335583d
commit cd51987f17
No known key found for this signature in database
GPG key ID: 8AF42975C787E0B2

View file

@ -1538,8 +1538,15 @@ getresolution () {
awk '/Resolution:/ {printf $2"x"$4" @ "$6"Hz, "}')"
fi
[ "$refresh_rate" == "off" ] || [ "${resolution// * @ }" == "0Hz" ] && \
resolution="${resolution// @ *[0-9]Hz}"
if [ "$refresh_rate" == "off" ] || [ "${resolution// * @ }" == "0Hz" ]; then
IFS=","
for res in $resolution; do
res="${res// @ *[0-9]Hz}"
newres="$newres, $res"
done
unset IFS
resolution="${newres:2}"
fi
;;
"Windows")