Commit d0c67878 authored by Dylan Araps's avatar Dylan Araps Committed by GitHub

Merge pull request #366 from iandrewt/retina-fix

macOS: add @2x label for retina resolutions
parents 6ed294e9 2010d113
...@@ -1324,6 +1324,11 @@ getresolution() { ...@@ -1324,6 +1324,11 @@ getresolution() {
awk '/Resolution:/ {printf $2"x"$4" @ "$6"Hz, "}')" awk '/Resolution:/ {printf $2"x"$4" @ "$6"Hz, "}')"
fi fi
scale_factor="$(/usr/libexec/PlistBuddy -c "Print DisplayAnyUserSets:0:0:Resolution" /Library/Preferences/com.apple.windowserver.plist)"
[ "${scale_factor%.*}" == "2" ] && \
resolution="${resolution// @/@2x @}"
if [ "$refresh_rate" == "off" ]; then if [ "$refresh_rate" == "off" ]; then
resolution="${resolution// @ [0-9][0-9]Hz}" resolution="${resolution// @ [0-9][0-9]Hz}"
resolution="${resolution// @ [0-9][0-9][0-9]Hz}" resolution="${resolution// @ [0-9][0-9][0-9]Hz}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment