vga 9 pixel wide text char fix
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 7 Apr 2004 20:31:38 +0000 (20:31 +0000)
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 7 Apr 2004 20:31:38 +0000 (20:31 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@713 c046a42c-6fe2-441c-8c8c-71466251a162

hw/vga.c
hw/vga_template.h

index ce1754f..f05dd1c 100644 (file)
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -1138,7 +1138,7 @@ static void vga_draw_text(VGAState *s, int full_update)
     /* total width & height */
     cheight = (s->cr[9] & 0x1f) + 1;
     cw = 8;
-    if (s->sr[1] & 0x01)
+    if (!(s->sr[1] & 0x01))
         cw = 9;
     if (s->sr[1] & 0x08)
         cw = 16; /* NOTE: no 18 pixel wide */
@@ -1154,7 +1154,7 @@ static void vga_draw_text(VGAState *s, int full_update)
         height = (height + 1) / cheight;
     }
     if (width != s->last_width || height != s->last_height ||
-        cw != s->last_cw || cw != s->last_cw) {
+        cw != s->last_cw || cheight != s->last_ch) {
         dpy_resize(s->ds, width * cw, height * cheight);
         s->last_width = width;
         s->last_height = height;
index 810b4b1..766257c 100644 (file)
@@ -127,14 +127,14 @@ static void glue(vga_draw_glyph9_, DEPTH)(uint8_t *d, int linesize,
         else
             ((uint16_t *)d)[8] = bgcol;
 #else
-        ((uint32_t *)d)[0] = ((-(font_data >> 7)) & xorcol) ^ bgcol;
-        ((uint32_t *)d)[1] = ((-(font_data >> 6) & 1) & xorcol) ^ bgcol;
-        ((uint32_t *)d)[2] = ((-(font_data >> 5) & 1) & xorcol) ^ bgcol;
-        ((uint32_t *)d)[3] = ((-(font_data >> 4) & 1) & xorcol) ^ bgcol;
-        ((uint32_t *)d)[4] = ((-(font_data >> 3) & 1) & xorcol) ^ bgcol;
-        ((uint32_t *)d)[5] = ((-(font_data >> 2) & 1) & xorcol) ^ bgcol;
-        ((uint32_t *)d)[6] = ((-(font_data >> 1) & 1) & xorcol) ^ bgcol;
-        v = ((-(font_data >> 0) & 1) & xorcol) ^ bgcol;
+        ((uint32_t *)d)[0] = (-((font_data >> 7)) & xorcol) ^ bgcol;
+        ((uint32_t *)d)[1] = (-((font_data >> 6) & 1) & xorcol) ^ bgcol;
+        ((uint32_t *)d)[2] = (-((font_data >> 5) & 1) & xorcol) ^ bgcol;
+        ((uint32_t *)d)[3] = (-((font_data >> 4) & 1) & xorcol) ^ bgcol;
+        ((uint32_t *)d)[4] = (-((font_data >> 3) & 1) & xorcol) ^ bgcol;
+        ((uint32_t *)d)[5] = (-((font_data >> 2) & 1) & xorcol) ^ bgcol;
+        ((uint32_t *)d)[6] = (-((font_data >> 1) & 1) & xorcol) ^ bgcol;
+        v = (-((font_data >> 0) & 1) & xorcol) ^ bgcol;
         ((uint32_t *)d)[7] = v;
         if (dup9)
             ((uint32_t *)d)[8] = v;