summaryrefslogtreecommitdiffstats
path: root/hw/input/adb-mouse.c
diff options
context:
space:
mode:
authorMark Cave-Ayland2018-06-12 18:44:00 +0200
committerDavid Gibson2018-06-16 08:32:33 +0200
commitfb6649f172d6ea1a8d8980b7f93d31808eb06ff8 (patch)
tree8f729386dc912acf16ced60ebeb07046e3752ea4 /hw/input/adb-mouse.c
parentmac_newworld: wire up programmer switch to NMI handler (diff)
downloadqemu-fb6649f172d6ea1a8d8980b7f93d31808eb06ff8.tar.gz
qemu-fb6649f172d6ea1a8d8980b7f93d31808eb06ff8.tar.xz
qemu-fb6649f172d6ea1a8d8980b7f93d31808eb06ff8.zip
adb: fix read reg 3 byte ordering
According to the Apple ADB documentation, register 3 is a 2-byte register with the device address in the first byte, and the handler ID in the second byte. This is currently the opposite away to which QEMU returns them so switch the order around. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/input/adb-mouse.c')
-rw-r--r--hw/input/adb-mouse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/input/adb-mouse.c b/hw/input/adb-mouse.c
index 3ba6027d33..473045fbac 100644
--- a/hw/input/adb-mouse.c
+++ b/hw/input/adb-mouse.c
@@ -172,8 +172,8 @@ static int adb_mouse_request(ADBDevice *d, uint8_t *obuf,
case 1:
break;
case 3:
- obuf[0] = d->handler;
- obuf[1] = d->devaddr;
+ obuf[0] = d->devaddr;
+ obuf[1] = d->handler;
olen = 2;
break;
}