Commit 29020076bde346b6459218a4d3a42d8fa3ce0f1b

Authored by Filip Navara
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,11 +29,11 @@ typedef struct RotaryCoderState {
29 SysBusDevice busdev; 29 SysBusDevice busdev;
30 qemu_irq out[2]; 30 qemu_irq out[2];
31 uint8_t state; 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 uint8_t extension; 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 } RotaryCoderState; 37 } RotaryCoderState;
38 38
39 static void rotary_update(RotaryCoderState *s, int direction) 39 static void rotary_update(RotaryCoderState *s, int direction)
@@ -58,7 +58,7 @@ static void rotary_keyboard_event(void *opaque, int keycode) @@ -58,7 +58,7 @@ static void rotary_keyboard_event(void *opaque, int keycode)
58 keycode &= 0x7f; 58 keycode &= 0x7f;
59 keycode |= s->extension; 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 rotary_update(s, 3); 62 rotary_update(s, 3);
63 } else if (keycode == s->key_right || keycode == s->key_right_alt) { 63 } else if (keycode == s->key_right || keycode == s->key_right_alt) {
64 rotary_update(s, 1); 64 rotary_update(s, 1);