summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2009-07-21 11:16:54 -0700
committerJean-Baptiste Queru <jbq@google.com>2009-07-21 11:16:54 -0700
commitcf4550c3198d6b3d92cdc52707fe70d7cc0caa9f (patch)
tree6510f35ad004f1a4640b48264c290926e8596d7a /libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp
parent4cf03d381b2dff908857fceff0bec445f8d44f36 (diff)
downloadframeworks_base-cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f.zip
frameworks_base-cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f.tar.gz
frameworks_base-cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f.tar.bz2
donut snapshot
Diffstat (limited to 'libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp')
-rw-r--r--libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp b/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp
index f14d7e9..eec645e 100644
--- a/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp
+++ b/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp
@@ -189,9 +189,14 @@ void DisplayHardware::init(uint32_t dpy)
char property[PROPERTY_VALUE_MAX];
- if (property_get("ro.sf.lcd_density", property, NULL) <= 0) {
- LOGW("ro.sf.lcd_density not defined, using 160 dpi by default.");
- strcpy(property, "160");
+ /* Read density from build-specific ro.sf.lcd_density property
+ * except if it is overriden by qemu.sf.lcd_density.
+ */
+ if (property_get("qemu.sf.lcd_density", property, NULL) <= 0) {
+ if (property_get("ro.sf.lcd_density", property, NULL) <= 0) {
+ LOGW("ro.sf.lcd_density not defined, using 160 dpi by default.");
+ strcpy(property, "160");
+ }
}
mDensity = atoi(property) * (1.0f/160.0f);