diff options
-rw-r--r-- | hw/display/vga-pci.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c index ff5dfb2c23..93c8b5d4cf 100644 --- a/hw/display/vga-pci.c +++ b/hw/display/vga-pci.c @@ -81,11 +81,11 @@ static uint64_t pci_vga_ioport_read(void *ptr, hwaddr addr, switch (size) { case 1: - ret = vga_ioport_read(&d->vga, addr); + ret = vga_ioport_read(&d->vga, addr + 0x3c0); break; case 2: - ret = vga_ioport_read(&d->vga, addr); - ret |= vga_ioport_read(&d->vga, addr+1) << 8; + ret = vga_ioport_read(&d->vga, addr + 0x3c0); + ret |= vga_ioport_read(&d->vga, addr + 0x3c1) << 8; break; } return ret; |