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];
|
char property[PROPERTY_VALUE_MAX];
|
||||||
if (property_get("ro.sf.lcd_density", property, NULL) <= 0) {
|
/* Read density from build-specific ro.sf.lcd_density property
|
||||||
LOGW("ro.sf.lcd_density not defined, using 160 dpi by default.");
|
* except if it is overriden by qemu.sf.lcd_density.
|
||||||
strcpy(property, "160");
|
*/
|
||||||
}
|
if (property_get("qemu.sf.lcd_density", property, NULL) <= 0) {
|
||||||
|
if (property_get("ro.sf.lcd_density", property, NULL) <= 0) {
|
||||||
/* Override the property value if qemu.sf.lcd_density is defined. */
|
LOGW("ro.sf.lcd_density not defined, using 160 dpi by default.");
|
||||||
{
|
strcpy(property, "160");
|
||||||
char qemu_property[PROPERTY_VALUE_MAX];
|
|
||||||
if (property_get("qemu.sf.lcd_density", qemu_property, NULL) > 0) {
|
|
||||||
strlcpy(property, qemu_property, sizeof property);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mDensity = atoi(property) * (1.0f/160.0f);
|
mDensity = atoi(property) * (1.0f/160.0f);
|
||||||
|
|||||||
Reference in New Issue
Block a user