Commit eccabc6ee0da82a3cb6037537c145fae08c23041

Authored by bellard
1 parent bb058620

vga 9 pixel wide text char fix


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@713 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 2 changed files with 10 additions and 10 deletions
hw/vga.c
... ... @@ -1138,7 +1138,7 @@ static void vga_draw_text(VGAState *s, int full_update)
1138 1138 /* total width & height */
1139 1139 cheight = (s->cr[9] & 0x1f) + 1;
1140 1140 cw = 8;
1141   - if (s->sr[1] & 0x01)
  1141 + if (!(s->sr[1] & 0x01))
1142 1142 cw = 9;
1143 1143 if (s->sr[1] & 0x08)
1144 1144 cw = 16; /* NOTE: no 18 pixel wide */
... ... @@ -1154,7 +1154,7 @@ static void vga_draw_text(VGAState *s, int full_update)
1154 1154 height = (height + 1) / cheight;
1155 1155 }
1156 1156 if (width != s->last_width || height != s->last_height ||
1157   - cw != s->last_cw || cw != s->last_cw) {
  1157 + cw != s->last_cw || cheight != s->last_ch) {
1158 1158 dpy_resize(s->ds, width * cw, height * cheight);
1159 1159 s->last_width = width;
1160 1160 s->last_height = height;
... ...
hw/vga_template.h
... ... @@ -127,14 +127,14 @@ static void glue(vga_draw_glyph9_, DEPTH)(uint8_t *d, int linesize,
127 127 else
128 128 ((uint16_t *)d)[8] = bgcol;
129 129 #else
130   - ((uint32_t *)d)[0] = ((-(font_data >> 7)) & xorcol) ^ bgcol;
131   - ((uint32_t *)d)[1] = ((-(font_data >> 6) & 1) & xorcol) ^ bgcol;
132   - ((uint32_t *)d)[2] = ((-(font_data >> 5) & 1) & xorcol) ^ bgcol;
133   - ((uint32_t *)d)[3] = ((-(font_data >> 4) & 1) & xorcol) ^ bgcol;
134   - ((uint32_t *)d)[4] = ((-(font_data >> 3) & 1) & xorcol) ^ bgcol;
135   - ((uint32_t *)d)[5] = ((-(font_data >> 2) & 1) & xorcol) ^ bgcol;
136   - ((uint32_t *)d)[6] = ((-(font_data >> 1) & 1) & xorcol) ^ bgcol;
137   - v = ((-(font_data >> 0) & 1) & xorcol) ^ bgcol;
  130 + ((uint32_t *)d)[0] = (-((font_data >> 7)) & xorcol) ^ bgcol;
  131 + ((uint32_t *)d)[1] = (-((font_data >> 6) & 1) & xorcol) ^ bgcol;
  132 + ((uint32_t *)d)[2] = (-((font_data >> 5) & 1) & xorcol) ^ bgcol;
  133 + ((uint32_t *)d)[3] = (-((font_data >> 4) & 1) & xorcol) ^ bgcol;
  134 + ((uint32_t *)d)[4] = (-((font_data >> 3) & 1) & xorcol) ^ bgcol;
  135 + ((uint32_t *)d)[5] = (-((font_data >> 2) & 1) & xorcol) ^ bgcol;
  136 + ((uint32_t *)d)[6] = (-((font_data >> 1) & 1) & xorcol) ^ bgcol;
  137 + v = (-((font_data >> 0) & 1) & xorcol) ^ bgcol;
138 138 ((uint32_t *)d)[7] = v;
139 139 if (dup9)
140 140 ((uint32_t *)d)[8] = v;
... ...