From cdca5efd64ac52af0d780b38976884cc3439223a Mon Sep 17 00:00:00 2001 From: Xavier Ducrohet Date: Tue, 17 May 2011 10:59:24 -0700 Subject: Add support for xhdpi when injecting a skin dpi into the emulator. Change-Id: I58f06af3c39efc1fcc7dd4e53a701136229379de --- android/hw-lcd.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'android/hw-lcd.c') diff --git a/android/hw-lcd.c b/android/hw-lcd.c index 2c06d69..f84f661 100644 --- a/android/hw-lcd.c +++ b/android/hw-lcd.c @@ -19,12 +19,14 @@ hwLcd_setBootProperty(int density) char temp[8]; /* map density to one of our three values for now */ - if (density < (LCD_DENSITY_MIN + LCD_DENSITY_DEFAULT)/2) - density = LCD_DENSITY_MIN; - else if (density < (LCD_DENSITY_DEFAULT + LCD_DENSITY_MAX)/2) - density = LCD_DENSITY_DEFAULT; + if (density < (LCD_DENSITY_LDPI + LCD_DENSITY_MDPI)/2) + density = LCD_DENSITY_LDPI; + else if (density < (LCD_DENSITY_MDPI + LCD_DENSITY_HDPI)/2) + density = LCD_DENSITY_MDPI; + else if (density < (LCD_DENSITY_HDPI + LCD_DENSITY_XHDPI)/2) + density = LCD_DENSITY_HDPI; else - density = LCD_DENSITY_MAX; + density = LCD_DENSITY_XHDPI; snprintf(temp, sizeof temp, "%d", density); boot_property_add("qemu.sf.lcd_density", temp); -- cgit v1.1