/[gxemul]/trunk/src/devices/dev_vga.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/devices/dev_vga.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 9 by dpavlin, Mon Oct 8 16:18:11 2007 UTC revision 10 by dpavlin, Mon Oct 8 16:18:27 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *   *
28   *  $Id: dev_vga.c,v 1.74 2005/05/29 16:04:28 debug Exp $   *  $Id: dev_vga.c,v 1.75 2005/06/26 11:43:48 debug Exp $
29   *   *
30   *  VGA charcell and graphics device.   *  VGA charcell and graphics device.
31   *   *
# Line 260  static void vga_update_textmode(struct m Line 260  static void vga_update_textmode(struct m
260                  d->charcells_outputed[i+1] = d->charcells[base+i+1];                  d->charcells_outputed[i+1] = d->charcells[base+i+1];
261    
262                  if (!printed_last || x == 0) {                  if (!printed_last || x == 0) {
263                          sprintf(s, "\033[%i;%iH", y + 1, x + 1);                          snprintf(s, sizeof(s), "\033[%i;%iH", y + 1, x + 1);
264                          c_putstr(d, s);                          c_putstr(d, s);
265                  }                  }
266                  if (oldcolor < 0 || (bg<<4)+fg != oldcolor || !printed_last) {                  if (oldcolor < 0 || (bg<<4)+fg != oldcolor || !printed_last) {
267                          sprintf(s, "\033[0;"); c_putstr(d, s);                          snprintf(s, sizeof(s), "\033[0;"); c_putstr(d, s);
268    
269                          switch (fg & 7) {                          switch (fg & 7) {
270                          case 0: c_putstr(d, "30"); break;                          case 0: c_putstr(d, "30"); break;
# Line 301  static void vga_update_textmode(struct m Line 301  static void vga_update_textmode(struct m
301          }          }
302    
303          /*  Restore the terminal's cursor position:  */          /*  Restore the terminal's cursor position:  */
304          sprintf(s, "\033[%i;%iH", d->cursor_y + 1, d->cursor_x + 1);          snprintf(s, sizeof(s), "\033[%i;%iH", d->cursor_y + 1, d->cursor_x + 1);
305          c_putstr(d, s);          c_putstr(d, s);
306  }  }
307    

Legend:
Removed from v.9  
changed lines
  Added in v.10

  ViewVC Help
Powered by ViewVC 1.1.26