diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-03-18 17:18:41 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-03-18 17:18:41 +0000 |
commit | 4829e0378dfb91d55af9dfd741bd09e8f2c4f91a (patch) | |
tree | 75532c6629f6b4994267a1b42ea635c7b1443702 /replay | |
parent | 879c26fb9fd950eefcac64cc854b22edc05e317a (diff) | |
parent | 3666a97f78704b941c360dc917acb14c8774eca7 (diff) |
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2016-03-18' into staging
QAPI patches for 2016-03-18
# gpg: Signature made Fri 18 Mar 2016 09:54:57 GMT using RSA key ID EB918653
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
# gpg: aka "Markus Armbruster <armbru@pond.sub.org>"
* remotes/armbru/tags/pull-qapi-2016-03-18:
qapi: Use anonymous bases in QMP flat unions
qapi: Allow anonymous base for flat union
qapi: Make BlockdevOptions doc example closer to reality
qapi: Don't special-case simple union wrappers
qapi: Drop unused c_null()
qapi: Inline gen_visit_members() into lone caller
qapi-commands: Inline single-use helpers of gen_marshal()
qapi-commands: Utilize implicit struct visits
qapi-event: Utilize implicit struct visits
qapi-event: Drop qmp_output_get_qobject() null check
qapi: Emit implicit structs in generated C
qapi: Adjust names of implicit types
qapi: Make c_type() more OO-like
qapi: Fix command with named empty argument type
qapi: Assert in places where variants are not handled
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'replay')
-rw-r--r-- | replay/replay-input.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/replay/replay-input.c b/replay/replay-input.c index c38af50f74..2d5d9191ca 100644 --- a/replay/replay-input.c +++ b/replay/replay-input.c @@ -54,16 +54,16 @@ void replay_save_input_event(InputEvent *evt) switch (evt->type) { case INPUT_EVENT_KIND_KEY: - key = evt->u.key; + key = evt->u.key.data; replay_put_dword(key->key->type); switch (key->key->type) { case KEY_VALUE_KIND_NUMBER: - replay_put_qword(key->key->u.number); + replay_put_qword(key->key->u.number.data); replay_put_byte(key->down); break; case KEY_VALUE_KIND_QCODE: - replay_put_dword(key->key->u.qcode); + replay_put_dword(key->key->u.qcode.data); replay_put_byte(key->down); break; case KEY_VALUE_KIND__MAX: @@ -72,17 +72,17 @@ void replay_save_input_event(InputEvent *evt) } break; case INPUT_EVENT_KIND_BTN: - btn = evt->u.btn; + btn = evt->u.btn.data; replay_put_dword(btn->button); replay_put_byte(btn->down); break; case INPUT_EVENT_KIND_REL: - move = evt->u.rel; + move = evt->u.rel.data; replay_put_dword(move->axis); replay_put_qword(move->value); break; case INPUT_EVENT_KIND_ABS: - move = evt->u.abs; + move = evt->u.abs.data; replay_put_dword(move->axis); replay_put_qword(move->value); break; @@ -105,17 +105,17 @@ InputEvent *replay_read_input_event(void) evt.type = replay_get_dword(); switch (evt.type) { case INPUT_EVENT_KIND_KEY: - evt.u.key = &key; - evt.u.key->key->type = replay_get_dword(); + evt.u.key.data = &key; + evt.u.key.data->key->type = replay_get_dword(); - switch (evt.u.key->key->type) { + switch (evt.u.key.data->key->type) { case KEY_VALUE_KIND_NUMBER: - evt.u.key->key->u.number = replay_get_qword(); - evt.u.key->down = replay_get_byte(); + evt.u.key.data->key->u.number.data = replay_get_qword(); + evt.u.key.data->down = replay_get_byte(); break; case KEY_VALUE_KIND_QCODE: - evt.u.key->key->u.qcode = (QKeyCode)replay_get_dword(); - evt.u.key->down = replay_get_byte(); + evt.u.key.data->key->u.qcode.data = (QKeyCode)replay_get_dword(); + evt.u.key.data->down = replay_get_byte(); break; case KEY_VALUE_KIND__MAX: /* keep gcc happy */ @@ -123,19 +123,19 @@ InputEvent *replay_read_input_event(void) } break; case INPUT_EVENT_KIND_BTN: - evt.u.btn = &btn; - evt.u.btn->button = (InputButton)replay_get_dword(); - evt.u.btn->down = replay_get_byte(); + evt.u.btn.data = &btn; + evt.u.btn.data->button = (InputButton)replay_get_dword(); + evt.u.btn.data->down = replay_get_byte(); break; case INPUT_EVENT_KIND_REL: - evt.u.rel = &rel; - evt.u.rel->axis = (InputAxis)replay_get_dword(); - evt.u.rel->value = replay_get_qword(); + evt.u.rel.data = &rel; + evt.u.rel.data->axis = (InputAxis)replay_get_dword(); + evt.u.rel.data->value = replay_get_qword(); break; case INPUT_EVENT_KIND_ABS: - evt.u.abs = &abs; - evt.u.abs->axis = (InputAxis)replay_get_dword(); - evt.u.abs->value = replay_get_qword(); + evt.u.abs.data = &abs; + evt.u.abs.data->axis = (InputAxis)replay_get_dword(); + evt.u.abs.data->value = replay_get_qword(); break; case INPUT_EVENT_KIND__MAX: /* keep gcc happy */ |