mirror of
https://github.com/akatrevorjay/edid-generator.git
synced 2026-01-15 23:50:28 +01:00
Remove half-done computation
This commit is contained in:
@@ -21,7 +21,7 @@ template-S() {
|
|||||||
local -i vdisp="$1" vsyncstart="$2" vsyncend="$3" vtotal="$4"; shift 4
|
local -i vdisp="$1" vsyncstart="$2" vsyncend="$3" vtotal="$4"; shift 4
|
||||||
|
|
||||||
local -i hsync_polarity=0 vsync_polarity=0 dpi=96 vfreq_hz=60
|
local -i hsync_polarity=0 vsync_polarity=0 dpi=96 vfreq_hz=60
|
||||||
local edid_version="1.3" ratio="compute" # TODO calc ratio
|
local edid_version="1.3" ratio="16:9" # TODO calc ratio
|
||||||
|
|
||||||
local arg
|
local arg
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
@@ -36,30 +36,6 @@ template-S() {
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
case "$ratio" in
|
|
||||||
compute)
|
|
||||||
find-closest-ratio() {
|
|
||||||
local x=$1 y=$2 default=$3; shift 3
|
|
||||||
[ $# -gt 0 ] || set -- 16:10 16:9 4:3 5:4 # supported already in edid.S
|
|
||||||
|
|
||||||
local -A vals=()
|
|
||||||
local r
|
|
||||||
for r in "$@"; do
|
|
||||||
local -i rx=${ratio%%:*} ry=${ratio#*:}
|
|
||||||
local v=$(( abs( $x / $rx - $y / $ry ) ))
|
|
||||||
vals[$v]=$
|
|
||||||
done
|
|
||||||
echo $(( $hdisp / 16 ))
|
|
||||||
}
|
|
||||||
ratio="16:9"
|
|
||||||
if [[ $(( $hdisp / 16 - $vdisp / 9 )) -lt $(( h )) ]]; then
|
|
||||||
local -a vals=($(( $hdisp / 4 - $vdisp / 3 )))
|
|
||||||
for
|
|
||||||
if [[ $(()) ]]
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
esac
|
|
||||||
local -A defines
|
local -A defines
|
||||||
defines=(
|
defines=(
|
||||||
VERSION "${edid_version%%.*}"
|
VERSION "${edid_version%%.*}"
|
||||||
|
|||||||
Reference in New Issue
Block a user