aboutsummaryrefslogtreecommitdiffstats
path: root/parse-base-block.cpp
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2020-11-03 20:36:27 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2020-11-03 20:36:27 +0100
commit9ef2c6e7c7cea1391e8e544e363b64331ddea69e (patch)
tree1c02929cac8cfb17451521db253a7f5651f2b894 /parse-base-block.cpp
parentef391efaf35c24ae043af07146d2aaf0d63f3ac5 (diff)
edid-decode: use correct aspect ratio formatting
Use %.2f instead of %.f. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'parse-base-block.cpp')
-rw-r--r--parse-base-block.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse-base-block.cpp b/parse-base-block.cpp
index 87e30f4..33d8cbd 100644
--- a/parse-base-block.cpp
+++ b/parse-base-block.cpp
@@ -1671,9 +1671,9 @@ void edid_state::parse_base_block(const unsigned char *x)
}
else if (base.edid_minor >= 4 && (x[0x15] || x[0x16])) {
if (x[0x15])
- printf(" Aspect ratio: %f (landscape)\n", (x[0x15] + 99) / 100.0);
+ printf(" Aspect ratio: %.2f (landscape)\n", (x[0x15] + 99) / 100.0);
else
- printf(" Aspect ratio: %f (portrait)\n", 100.0 / (x[0x16] + 99));
+ printf(" Aspect ratio: %.2f (portrait)\n", 100.0 / (x[0x16] + 99));
} else {
/* Either or both can be zero for 1.3 and before */
printf(" Image size is variable\n");

Privacy Policy