fix color with EDID
This commit is contained in:
parent
35d80ce18b
commit
4a0290d387
6 changed files with 18 additions and 12 deletions
|
@ -16,9 +16,7 @@ macOS 的 DPI 机制和 Windows 下不一样,比如 1080p 的屏幕在 Windows
|
||||||
|
|
||||||
![设置](./img/preferences.jpg)
|
![设置](./img/preferences.jpg)
|
||||||
|
|
||||||
<video width="100%" controls autoplay loop>
|
![设置](./img/hidpi.gif)
|
||||||
<source src="./img/hidpi.mp4" type="video/mp4">
|
|
||||||
</video>
|
|
||||||
|
|
||||||
## 使用方法
|
## 使用方法
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,7 @@ System Preferences
|
||||||
|
|
||||||
![Preferences](./img/preferences.jpg)
|
![Preferences](./img/preferences.jpg)
|
||||||
|
|
||||||
<video width="100%" controls autoplay loop>
|
![Preferences](./img/hidpi.gif)
|
||||||
<source src="./img/hidpi.mp4" type="video/mp4">
|
|
||||||
</video>
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|
11
hidpi-zh.sh
11
hidpi-zh.sh
|
@ -99,9 +99,6 @@ EEF
|
||||||
#
|
#
|
||||||
get_edid
|
get_edid
|
||||||
|
|
||||||
edID=$(echo $EDID | sed 's/../b5/21')
|
|
||||||
EDid=$(printf $edID | xxd -r -p | base64)
|
|
||||||
|
|
||||||
thisDir=$(dirname $0)
|
thisDir=$(dirname $0)
|
||||||
thatDir="/System/Library/Displays/Contents/Resources/Overrides"
|
thatDir="/System/Library/Displays/Contents/Resources/Overrides"
|
||||||
Overrides="\/System\/Library\/Displays\/Contents\/Resources\/Overrides\/"
|
Overrides="\/System\/Library\/Displays\/Contents\/Resources\/Overrides\/"
|
||||||
|
@ -438,6 +435,14 @@ function enable_hidpi_with_patch()
|
||||||
{
|
{
|
||||||
choose_icon
|
choose_icon
|
||||||
main
|
main
|
||||||
|
|
||||||
|
version=${EDID:38:2}
|
||||||
|
basicparams=${EDID:40:2}
|
||||||
|
checksum=${EDID:254:2}
|
||||||
|
newchecksum=$(printf '%x' $((0x$checksum + 0x$version +0x$basicparams - 0x04 - 0x90)) | tail -c 2)
|
||||||
|
newedid=${EDID:0:38}0490${EDID:42:212}${newchecksum}
|
||||||
|
EDid=$(printf $newedid | xxd -r -p | base64)
|
||||||
|
|
||||||
/usr/bin/sed -i "" "s:EDid:${EDid}:g" $dpiFile
|
/usr/bin/sed -i "" "s:EDid:${EDid}:g" $dpiFile
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
11
hidpi.sh
11
hidpi.sh
|
@ -99,9 +99,6 @@ EEF
|
||||||
#
|
#
|
||||||
get_edid
|
get_edid
|
||||||
|
|
||||||
edID=$(echo $EDID | sed 's/../b5/21')
|
|
||||||
EDid=$(echo $edID | xxd -r -p | base64)
|
|
||||||
|
|
||||||
thisDir=$(dirname $0)
|
thisDir=$(dirname $0)
|
||||||
thatDir="/System/Library/Displays/Contents/Resources/Overrides"
|
thatDir="/System/Library/Displays/Contents/Resources/Overrides"
|
||||||
Overrides="\/System\/Library\/Displays\/Contents\/Resources\/Overrides\/"
|
Overrides="\/System\/Library\/Displays\/Contents\/Resources\/Overrides\/"
|
||||||
|
@ -438,6 +435,14 @@ function enable_hidpi_with_patch()
|
||||||
{
|
{
|
||||||
choose_icon
|
choose_icon
|
||||||
main
|
main
|
||||||
|
|
||||||
|
version=${EDID:38:2}
|
||||||
|
basicparams=${EDID:40:2}
|
||||||
|
checksum=${EDID:254:2}
|
||||||
|
newchecksum=$(printf '%x' $((0x$checksum + 0x$version +0x$basicparams - 0x04 - 0x90)) | tail -c 2)
|
||||||
|
newedid=${EDID:0:38}0490${EDID:42:212}${newchecksum}
|
||||||
|
EDid=$(printf $newedid | xxd -r -p | base64)
|
||||||
|
|
||||||
/usr/bin/sed -i "" "s:EDid:${EDid}:g" $dpiFile
|
/usr/bin/sed -i "" "s:EDid:${EDid}:g" $dpiFile
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
BIN
img/hidpi.gif
Normal file
BIN
img/hidpi.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 339 KiB |
BIN
img/hidpi.mp4
BIN
img/hidpi.mp4
Binary file not shown.
Loading…
Reference in a new issue