Commit aba35a6cd1c70f8cb4b9a08d6685eafe76725cee

Authored by malc
1 parent cbbccffc

Fix VGA issue introduced by r6349

Thanks to Robert Riebisch for bisection

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6858 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 10 additions and 2 deletions
hw/vga.c
@@ -1619,6 +1619,16 @@ static void vga_draw_graphic(VGAState *s, int full_update) @@ -1619,6 +1619,16 @@ static void vga_draw_graphic(VGAState *s, int full_update)
1619 s->double_scan = double_scan; 1619 s->double_scan = double_scan;
1620 } 1620 }
1621 1621
  1622 + if (shift_control == 0) {
  1623 + if (s->sr[0x01] & 8) {
  1624 + disp_width <<= 1;
  1625 + }
  1626 + } else if (shift_control == 1) {
  1627 + if (s->sr[0x01] & 8) {
  1628 + disp_width <<= 1;
  1629 + }
  1630 + }
  1631 +
1622 depth = s->get_bpp(s); 1632 depth = s->get_bpp(s);
1623 if (s->line_offset != s->last_line_offset || 1633 if (s->line_offset != s->last_line_offset ||
1624 disp_width != s->last_width || 1634 disp_width != s->last_width ||
@@ -1660,7 +1670,6 @@ static void vga_draw_graphic(VGAState *s, int full_update) @@ -1660,7 +1670,6 @@ static void vga_draw_graphic(VGAState *s, int full_update)
1660 full_update |= update_palette16(s); 1670 full_update |= update_palette16(s);
1661 if (s->sr[0x01] & 8) { 1671 if (s->sr[0x01] & 8) {
1662 v = VGA_DRAW_LINE4D2; 1672 v = VGA_DRAW_LINE4D2;
1663 - disp_width <<= 1;  
1664 } else { 1673 } else {
1665 v = VGA_DRAW_LINE4; 1674 v = VGA_DRAW_LINE4;
1666 } 1675 }
@@ -1669,7 +1678,6 @@ static void vga_draw_graphic(VGAState *s, int full_update) @@ -1669,7 +1678,6 @@ static void vga_draw_graphic(VGAState *s, int full_update)
1669 full_update |= update_palette16(s); 1678 full_update |= update_palette16(s);
1670 if (s->sr[0x01] & 8) { 1679 if (s->sr[0x01] & 8) {
1671 v = VGA_DRAW_LINE2D2; 1680 v = VGA_DRAW_LINE2D2;
1672 - disp_width <<= 1;  
1673 } else { 1681 } else {
1674 v = VGA_DRAW_LINE2; 1682 v = VGA_DRAW_LINE2;
1675 } 1683 }