Merge change 4718 into donut
* changes: Fix sim-eng build and simplify previous lcd-density related patch
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user