diff options
author | David 'Digit' Turner <digit@google.com> | 2009-06-19 00:36:12 +0200 |
---|---|---|
committer | David 'Digit' Turner <digit@google.com> | 2009-06-19 00:36:12 +0200 |
commit | c5b127050f2dbed015d6b01703a33062d6910d4a (patch) | |
tree | 03c81fd16aae63ceca713515a565c702aee35d60 /android/main.c | |
parent | 5998b8947d8c2788b62d38afdd571ddff78648a5 (diff) | |
download | external_qemu-c5b127050f2dbed015d6b01703a33062d6910d4a.zip external_qemu-c5b127050f2dbed015d6b01703a33062d6910d4a.tar.gz external_qemu-c5b127050f2dbed015d6b01703a33062d6910d4a.tar.bz2 |
Add a new hw.lcd.density hardware property to AVD configuration files.
This value can be overriden with the already existing -dpi-device <value> option.
The value is mapped to one of 120,160 and 240, then set to the boot-time property
named qemu.sf.lcd_density used by the framework to properly select assets and/or
resize them at runtime.
This means that "emulator -dpi-device 130" will select 120 lcd_density, or
"emulator -dpi-device 220" will select a 240 one.
Diffstat (limited to 'android/main.c')
-rw-r--r-- | android/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/android/main.c b/android/main.c index e90beaa..f93bfa5 100644 --- a/android/main.c +++ b/android/main.c @@ -50,6 +50,7 @@ #include "android/gps.h" #include "android/hw-qemud.h" #include "android/hw-kmsg.h" +#include "android/hw-lcd.h" #include "android/hw-control.h" #include "android/hw-sensors.h" #include "android/boot-properties.h" @@ -393,7 +394,7 @@ qemulator_rotate_keycode( QEmulator* emulator, static int get_device_dpi( AndroidOptions* opts ) { - int dpi_device = DEFAULT_DEVICE_DPI; + int dpi_device = android_hw->hw_lcd_density; if (opts->dpi_device != NULL) { char* end; @@ -2498,6 +2499,8 @@ int main(int argc, char **argv) */ boot_property_init_service(); + hwLcd_setBootProperty(get_device_dpi(opts)); + if (opts->prop != NULL) { ParamList* pl = opts->prop; for ( ; pl != NULL; pl = pl->next ) { |