aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/usb-hid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/usb-hid.c b/hw/usb-hid.c
index 972543f282..76fdce6912 100644
--- a/hw/usb-hid.c
+++ b/hw/usb-hid.c
@@ -65,7 +65,7 @@ typedef struct USBHIDState {
};
int kind;
int protocol;
- int idle;
+ uint8_t idle;
int changed;
void *datain_opaque;
void (*datain)(void *);
@@ -794,7 +794,7 @@ static int usb_hid_handle_control(USBDevice *dev, int request, int value,
data[0] = s->idle;
break;
case SET_IDLE:
- s->idle = value;
+ s->idle = (uint8_t) (value >> 8);
ret = 0;
break;
default: