aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGriff Hazen <griff@google.com>2015-07-27 19:04:12 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-07-27 19:04:12 +0000
commit0e04a7cd7ac88ec850a24d15a884a52663ca82d5 (patch)
treefcd7e43d94920e6938cfecc966c65803db921cc7
parentf12249def772d4cc5e176b0534a5a5e9d2eab79b (diff)
parent86e5e6acb1e8f2dee89a8c7927750cb0f955e109 (diff)
downloadqemu-0e04a7cd7ac88ec850a24d15a884a52663ca82d5.tar.gz
Merge "Add emulator support for 280 and 360 dpi" into studio-1.4-dev
-rw-r--r--android/hw-lcd.c11
-rw-r--r--android/hw-lcd.h3
2 files changed, 9 insertions, 5 deletions
diff --git a/android/hw-lcd.c b/android/hw-lcd.c
index 5b5d4e7be7..26c16eeaea 100644
--- a/android/hw-lcd.c
+++ b/android/hw-lcd.c
@@ -18,7 +18,7 @@ hwLcd_setBootProperty(int density)
{
char temp[8];
- /* Map density to one of our five bucket values.
+ /* Map density to one of our bucket values.
The TV density is a bit particular (and not actually a bucket
value) so we do only exact match on it.
*/
@@ -27,10 +27,14 @@ hwLcd_setBootProperty(int density)
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)
+ else if (density < (LCD_DENSITY_HDPI + LCD_DENSITY_280DPI)/2)
density = LCD_DENSITY_HDPI;
- else if (density < (LCD_DENSITY_XHDPI + LCD_DENSITY_400DPI)/2)
+ else if (density < (LCD_DENSITY_280DPI + LCD_DENSITY_XHDPI)/2)
+ density = LCD_DENSITY_280DPI;
+ else if (density < (LCD_DENSITY_XHDPI + LCD_DENSITY_360DPI)/2)
density = LCD_DENSITY_XHDPI;
+ else if (density < (LCD_DENSITY_360DPI + LCD_DENSITY_400DPI)/2)
+ density = LCD_DENSITY_360DPI;
else if (density < (LCD_DENSITY_400DPI + LCD_DENSITY_XXHDPI)/2)
density = LCD_DENSITY_400DPI;
else if (density < (LCD_DENSITY_XXHDPI + LCD_DENSITY_XXXHDPI)/2)
@@ -42,4 +46,3 @@ hwLcd_setBootProperty(int density)
snprintf(temp, sizeof temp, "%d", density);
boot_property_add("qemu.sf.lcd_density", temp);
}
-
diff --git a/android/hw-lcd.h b/android/hw-lcd.h
index b8abb5836f..24d1fe9408 100644
--- a/android/hw-lcd.h
+++ b/android/hw-lcd.h
@@ -16,7 +16,9 @@
#define LCD_DENSITY_MDPI 160
#define LCD_DENSITY_TVDPI 213
#define LCD_DENSITY_HDPI 240
+#define LCD_DENSITY_280DPI 280
#define LCD_DENSITY_XHDPI 320
+#define LCD_DENSITY_360DPI 360
#define LCD_DENSITY_400DPI 400
#define LCD_DENSITY_XXHDPI 480
#define LCD_DENSITY_XXXHDPI 640
@@ -25,4 +27,3 @@
extern void hwLcd_setBootProperty(int density);
#endif /* _ANDROID_HW_LCD_H */
-