summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2009-07-25 19:52:22 -0700
committerJean-Baptiste Queru <jbq@google.com>2009-07-25 21:15:25 -0700
commit9261bae1d2a769cb7453d2cadb6040be38ec86e5 (patch)
treeb9edeeb20bf20eb9f76902a9671dbe10e871717b /libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp
parent4cce5bd5ccc7c8468d0f8cc359525f82a45dedec (diff)
parent4d3b5c1e36f2a3746a1c87f8af97d4fe97e8f49e (diff)
downloadframeworks_native-9261bae1d2a769cb7453d2cadb6040be38ec86e5.zip
frameworks_native-9261bae1d2a769cb7453d2cadb6040be38ec86e5.tar.gz
frameworks_native-9261bae1d2a769cb7453d2cadb6040be38ec86e5.tar.bz2
Merge korg/donut into korg/master
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);