aboutsummaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorVladimir Chtchetkine <vchtchetkine@google.com>2012-03-16 12:25:23 -0700
committerVladimir Chtchetkine <vchtchetkine@google.com>2012-03-19 08:29:19 -0700
commit863d1010d9c8fa4342b1b0ea860bcfb096806acc (patch)
tree6e6bb1fa3e508f9633586b2a4b9db73ffb97d647 /hw
parenta342edc996e079f2d1a913ec19d25fd1c118af4e (diff)
downloadexternal_qemu-863d1010d9c8fa4342b1b0ea860bcfb096806acc.zip
external_qemu-863d1010d9c8fa4342b1b0ea860bcfb096806acc.tar.gz
external_qemu-863d1010d9c8fa4342b1b0ea860bcfb096806acc.tar.bz2
Cleanup harware properties.
1. Remove unused hw.camera.maxHorizontalPixels, and hw.camera.maxVerticalPixels parameters. 2. Combine hw.touchScreen, and hw.multiTouch under one property: hw.screen Change-Id: I3cdf64f7d7e46486110cbc0769f9d98a61f0bea5
Diffstat (limited to 'hw')
-rw-r--r--hw/goldfish_events_device.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/hw/goldfish_events_device.c b/hw/goldfish_events_device.c
index 83e9fdf..0aa5a1f 100644
--- a/hw/goldfish_events_device.c
+++ b/hw/goldfish_events_device.c
@@ -271,11 +271,11 @@ static void events_put_mouse(void *opaque, int dx, int dy, int dz, int buttons_s
* in android/skin/trackball.c and android/skin/window.c
*/
if (dz == 0) {
- if (android_hw->hw_multiTouch) {
+ if (androidHwConfig_isScreenMultiTouch(android_hw)) {
/* Convert mouse event into multi-touch event */
multitouch_update_pointer(MTES_MOUSE, 0, dx, dy,
(buttons_state & 1) ? 0x81 : 0);
- } else if (android_hw->hw_touchScreen) {
+ } else if (androidHwConfig_isScreenTouch(android_hw)) {
enqueue_event(s, EV_ABS, ABS_X, dx);
enqueue_event(s, EV_ABS, ABS_Y, dy);
enqueue_event(s, EV_ABS, ABS_Z, dz);
@@ -402,7 +402,7 @@ void events_dev_init(uint32_t base, qemu_irq irq)
if (config->hw_trackBall) {
events_set_bit(s, EV_KEY, BTN_MOUSE);
}
- if (config->hw_touchScreen) {
+ if (androidHwConfig_isScreenTouch(config)) {
events_set_bit(s, EV_KEY, BTN_TOUCH);
}
@@ -451,7 +451,7 @@ void events_dev_init(uint32_t base, qemu_irq irq)
*
* EV_ABS events are sent when the touchscreen is pressed
*/
- if (config->hw_touchScreen || config->hw_multiTouch) {
+ if (!androidHwConfig_isScreenNoTouch(config)) {
ABSEntry* abs_values;
events_set_bit (s, EV_SYN, EV_ABS );
@@ -468,7 +468,7 @@ void events_dev_init(uint32_t base, qemu_irq irq)
* There is no need to save/restore this array in a snapshot
* since the values only depend on the hardware configuration.
*/
- s->abs_info_count = config->hw_multiTouch ? ABS_MAX * 4 : 3 * 4;
+ s->abs_info_count = androidHwConfig_isScreenMultiTouch(config) ? ABS_MAX * 4 : 3 * 4;
const int abs_size = sizeof(uint32_t) * s->abs_info_count;
s->abs_info = malloc(abs_size);
memset(s->abs_info, 0, abs_size);
@@ -478,7 +478,7 @@ void events_dev_init(uint32_t base, qemu_irq irq)
abs_values[ABS_Y].max = config->hw_lcd_height-1;
abs_values[ABS_Z].max = 1;
- if (config->hw_multiTouch) {
+ if (androidHwConfig_isScreenMultiTouch(config)) {
/*
* Setup multitouch.
*/