aboutsummaryrefslogtreecommitdiffstats
path: root/framebuffer.c
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-01-15 16:12:09 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-01-15 16:12:09 -0800
commit0724eefc1939d32ff3c1c00a47ca6b8cccff1edd (patch)
treeb693f74b51fc01bfc3f3de0c6d3c9ca1c77fcdf1 /framebuffer.c
parentc2db2b6accc7888df514261a7240e7759df95a4c (diff)
downloadexternal_qemu-0724eefc1939d32ff3c1c00a47ca6b8cccff1edd.zip
external_qemu-0724eefc1939d32ff3c1c00a47ca6b8cccff1edd.tar.gz
external_qemu-0724eefc1939d32ff3c1c00a47ca6b8cccff1edd.tar.bz2
auto import from //branches/cupcake/...@126645
Diffstat (limited to 'framebuffer.c')
-rw-r--r--framebuffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/framebuffer.c b/framebuffer.c
index 04177e0..d0f9b40 100644
--- a/framebuffer.c
+++ b/framebuffer.c
@@ -92,8 +92,8 @@ qframebuffer_set_dpi( QFrameBuffer* qfbuff,
** mm / 25.4 = dots / dpi
** mm = (dots * 25.4)/dpi
*/
- qfbuff->phys_width_mm = 25.4 * qfbuff->width / x_dpi;
- qfbuff->phys_height_mm = 25.4 * qfbuff->height / y_dpi;
+ qfbuff->phys_width_mm = (int)(0.5 + 25.4 * qfbuff->width / x_dpi);
+ qfbuff->phys_height_mm = (int)(0.5 + 25.4 * qfbuff->height / y_dpi);
}
/* alternative to qframebuffer_set_dpi where one can set the physical dimensions directly */