diff options
author | Griff Hazen <griff@google.com> | 2015-08-01 00:31:02 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2015-08-01 00:31:02 +0000 |
commit | c3b94166cee683d2b095bc9540cbf1176b881757 (patch) | |
tree | 2289f137e5ad5ad4d3cf1d979d8f5ffa85562176 | |
parent | b68b0762ccd4ad9f43ab8c790f76c21db959a364 (diff) | |
parent | 02018f8babe7be237dc9f80f93edbe32a8de47e3 (diff) | |
download | qemu-c3b94166cee683d2b095bc9540cbf1176b881757.tar.gz |
Merge "Add emulator support for 280 and 360 dpi" into studio-1.4-dev automerge: 0e04a7c
automerge: 02018f8
* commit '02018f8babe7be237dc9f80f93edbe32a8de47e3':
Add emulator support for 280 and 360 dpi
-rw-r--r-- | android/hw-lcd.c | 11 | ||||
-rw-r--r-- | android/hw-lcd.h | 3 |
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 */ - |