diff options
author | David 'Digit' Turner <digit@google.com> | 2009-06-19 04:41:12 +0200 |
---|---|---|
committer | David 'Digit' Turner <digit@google.com> | 2009-06-19 04:41:12 +0200 |
commit | 3c08a446c5b4f2682da1d8461bd1ed94060c29dc (patch) | |
tree | b0910aa8c13d0fc13c02ec4aabfa35e31b366e2f /libs | |
parent | 5502f04c1dcf2b1918858bacb99fb0480a711707 (diff) | |
download | frameworks_base-3c08a446c5b4f2682da1d8461bd1ed94060c29dc.zip frameworks_base-3c08a446c5b4f2682da1d8461bd1ed94060c29dc.tar.gz frameworks_base-3c08a446c5b4f2682da1d8461bd1ed94060c29dc.tar.bz2 |
Fix sim-eng build and simplify previous lcd-density related patch
Diffstat (limited to 'libs')
-rw-r--r-- | libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp b/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp index 971189f..eec645e 100644 --- a/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp +++ b/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp @@ -189,16 +189,13 @@ 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"); - } - - /* Override the property value if qemu.sf.lcd_density is defined. */ - { - char qemu_property[PROPERTY_VALUE_MAX]; - if (property_get("qemu.sf.lcd_density", qemu_property, NULL) > 0) { - strlcpy(property, qemu_property, sizeof property); + /* 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); |