aboutsummaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2011-08-11 18:47:27 -0700
committerXavier Ducrohet <xav@android.com>2011-08-22 11:10:50 -0700
commit72d561178e62b74923cfe3bc0faa59bcb07c57c3 (patch)
tree73281ee53a1af78289200a49b9ce9d180c9c59ad /hw
parent34ddd725dd424c4ad487d223feb0f38f13b10779 (diff)
downloadexternal_qemu-72d561178e62b74923cfe3bc0faa59bcb07c57c3.zip
external_qemu-72d561178e62b74923cfe3bc0faa59bcb07c57c3.tar.gz
external_qemu-72d561178e62b74923cfe3bc0faa59bcb07c57c3.tar.bz2
Revert "Revert "Merge c80340 from master to r13: Move charmap to hardware properties"..."
This reverts commit cccd28ca5064a7bd14282cd774ee5bb7126d5845. c80340 add a CL to tools_r13 that broken the build. It was therefore reverted with cccd28. This revert was merged into tools_r13 but shouldn't have been. This reverts the revert to put back the CL in master. Change-Id: I95fcefedb77596cfdf76269f248b2ae80c85c830
Diffstat (limited to 'hw')
-rw-r--r--hw/goldfish_events_device.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/hw/goldfish_events_device.c b/hw/goldfish_events_device.c
index 3072e3b..a5b2a21 100644
--- a/hw/goldfish_events_device.c
+++ b/hw/goldfish_events_device.c
@@ -102,8 +102,6 @@ static int events_state_load(QEMUFile* f, void* opaque, int version_id)
return qemu_get_struct(f, events_state_fields, s);
}
-extern const char* android_skin_keycharmap;
-
static void enqueue_event(events_state *s, unsigned int type, unsigned int code, int value)
{
int enqueued = s->last - s->first;
@@ -169,22 +167,11 @@ static unsigned dequeue_event(events_state *s)
return n;
}
-static const char*
-get_charmap_name(events_state *s)
-{
- if (s->name != NULL)
- return s->name;
-
- s->name = android_get_charmap_name();
- return s->name;
-}
-
-
static int get_page_len(events_state *s)
{
int page = s->page;
if (page == PAGE_NAME) {
- const char* name = get_charmap_name(s);
+ const char* name = s->name;
return strlen(name);
} if (page >= PAGE_EVBITS && page <= PAGE_EVBITS + EV_MAX)
return s->ev_bits[page - PAGE_EVBITS].len;
@@ -200,7 +187,7 @@ static int get_page_data(events_state *s, int offset)
if (offset > page_len)
return 0;
if (page == PAGE_NAME) {
- const char* name = get_charmap_name(s);
+ const char* name = s->name;
return name[offset];
} if (page >= PAGE_EVBITS && page <= PAGE_EVBITS + EV_MAX)
return s->ev_bits[page - PAGE_EVBITS].bits[offset];
@@ -347,9 +334,6 @@ void events_dev_init(uint32_t base, qemu_irq irq)
s = (events_state *) qemu_mallocz(sizeof(events_state));
- // charmap name will be determined on demand
- s->name = NULL;
-
/* now set the events capability bits depending on hardware configuration */
/* apparently, the EV_SYN array is used to indicate which other
* event classes to consider.
@@ -514,6 +498,7 @@ void events_dev_init(uint32_t base, qemu_irq irq)
s->first = 0;
s->last = 0;
s->state = STATE_INIT;
+ s->name = qemu_strdup(config->hw_keyboard_charmap);
/* This function migh fire buffered events to the device, so
* ensure that it is called after initialization is complete