Commit 29020076bde346b6459218a4d3a42d8fa3ce0f1b
1 parent
d2a6b43a
Fix the size of the property fields.
Showing
1 changed file
with
5 additions
and
5 deletions
hw/gpio_rotary.c
... | ... | @@ -29,11 +29,11 @@ typedef struct RotaryCoderState { |
29 | 29 | SysBusDevice busdev; |
30 | 30 | qemu_irq out[2]; |
31 | 31 | uint8_t state; |
32 | - uint8_t key_left; | |
33 | - uint8_t key_right; | |
34 | - uint8_t key_left_alt; | |
35 | - uint8_t key_right_alt; | |
36 | 32 | uint8_t extension; |
33 | + uint32_t key_left; | |
34 | + uint32_t key_right; | |
35 | + uint32_t key_left_alt; | |
36 | + uint32_t key_right_alt; | |
37 | 37 | } RotaryCoderState; |
38 | 38 | |
39 | 39 | static void rotary_update(RotaryCoderState *s, int direction) |
... | ... | @@ -58,7 +58,7 @@ static void rotary_keyboard_event(void *opaque, int keycode) |
58 | 58 | keycode &= 0x7f; |
59 | 59 | keycode |= s->extension; |
60 | 60 | |
61 | - if (keycode == s->key_left || keycode == s->key_left_alt) { | |
61 | + if (keycode == s->key_left || keycode == s->key_left_alt) { | |
62 | 62 | rotary_update(s, 3); |
63 | 63 | } else if (keycode == s->key_right || keycode == s->key_right_alt) { |
64 | 64 | rotary_update(s, 1); | ... | ... |