Diff for /qemu/console.c between versions 1.1.1.7 and 1.1.1.8

version 1.1.1.7, 2018/04/24 17:20:35 version 1.1.1.8, 2018/04/24 17:34:10
Line 307  static void vga_bitblt(DisplayState *ds, Line 307  static void vga_bitblt(DisplayState *ds,
                 (((uint32_t)(__x) & (uint32_t)0x00ff0000UL) >>  8) | \                  (((uint32_t)(__x) & (uint32_t)0x00ff0000UL) >>  8) | \
                 (((uint32_t)(__x) & (uint32_t)0xff000000UL) >> 24) ))                  (((uint32_t)(__x) & (uint32_t)0xff000000UL) >> 24) ))
   
 #ifdef WORDS_BIGENDIAN  #ifdef HOST_WORDS_BIGENDIAN
 #define PAT(x) x  #define PAT(x) x
 #else  #else
 #define PAT(x) cbswap_32(x)  #define PAT(x) cbswap_32(x)
Line 1317  void console_color_init(DisplayState *ds Line 1317  void console_color_init(DisplayState *ds
   
 static int n_text_consoles;  static int n_text_consoles;
 static CharDriverState *text_consoles[128];  static CharDriverState *text_consoles[128];
 static char *text_console_strs[128];  static QemuOpts *text_console_opts[128];
   
 static void text_console_do_init(CharDriverState *chr, DisplayState *ds, const char *p)  static void text_console_do_init(CharDriverState *chr, DisplayState *ds, QemuOpts *opts)
 {  {
     TextConsole *s;      TextConsole *s;
     unsigned width;      unsigned width;
     unsigned height;      unsigned height;
     static int color_inited;      static int color_inited;
   
     s = new_console(ds, (p == NULL) ? TEXT_CONSOLE : TEXT_CONSOLE_FIXED_SIZE);      width = qemu_opt_get_number(opts, "width", 0);
       if (width == 0)
           width = qemu_opt_get_number(opts, "cols", 0) * FONT_WIDTH;
   
       height = qemu_opt_get_number(opts, "height", 0);
       if (height == 0)
           height = qemu_opt_get_number(opts, "rows", 0) * FONT_HEIGHT;
   
       if (width == 0 || height == 0) {
           s = new_console(ds, TEXT_CONSOLE);
           width = ds_get_width(s->ds);
           height = ds_get_height(s->ds);
       } else {
           s = new_console(ds, TEXT_CONSOLE_FIXED_SIZE);
       }
   
     if (!s) {      if (!s) {
         free(chr);          free(chr);
         return;          return;
Line 1350  static void text_console_do_init(CharDri Line 1365  static void text_console_do_init(CharDri
     s->total_height = DEFAULT_BACKSCROLL;      s->total_height = DEFAULT_BACKSCROLL;
     s->x = 0;      s->x = 0;
     s->y = 0;      s->y = 0;
     width = ds_get_width(s->ds);  
     height = ds_get_height(s->ds);  
     if (p != NULL) {  
         width = strtoul(p, (char **)&p, 10);  
         if (*p == 'C') {  
             p++;  
             width *= FONT_WIDTH;  
         }  
         if (*p == 'x') {  
             p++;  
             height = strtoul(p, (char **)&p, 10);  
             if (*p == 'C') {  
                 p++;  
                 height *= FONT_HEIGHT;  
             }  
         }  
     }  
     s->g_width = width;      s->g_width = width;
     s->g_height = height;      s->g_height = height;
   
Line 1386  static void text_console_do_init(CharDri Line 1384  static void text_console_do_init(CharDri
     s->t_attrib = s->t_attrib_default;      s->t_attrib = s->t_attrib_default;
     text_console_resize(s);      text_console_resize(s);
   
     qemu_chr_reset(chr);      if (chr->label) {
           char msg[128];
           int len;
   
           s->t_attrib.bgcol = COLOR_BLUE;
           len = snprintf(msg, sizeof(msg), "%s console\r\n", chr->label);
           console_puts(chr, (uint8_t*)msg, len);
           s->t_attrib = s->t_attrib_default;
       }
   
       qemu_chr_generic_open(chr);
     if (chr->init)      if (chr->init)
         chr->init(chr);          chr->init(chr);
 }  }
   
 CharDriverState *text_console_init(const char *p)  CharDriverState *text_console_init(QemuOpts *opts)
 {  {
     CharDriverState *chr;      CharDriverState *chr;
   
Line 1402  CharDriverState *text_console_init(const Line 1410  CharDriverState *text_console_init(const
         exit(1);          exit(1);
     }      }
     text_consoles[n_text_consoles] = chr;      text_consoles[n_text_consoles] = chr;
     text_console_strs[n_text_consoles] = p ? qemu_strdup(p) : NULL;      text_console_opts[n_text_consoles] = opts;
     n_text_consoles++;      n_text_consoles++;
   
     return chr;      return chr;
Line 1413  void text_consoles_set_display(DisplaySt Line 1421  void text_consoles_set_display(DisplaySt
     int i;      int i;
   
     for (i = 0; i < n_text_consoles; i++) {      for (i = 0; i < n_text_consoles; i++) {
         text_console_do_init(text_consoles[i], ds, text_console_strs[i]);          text_console_do_init(text_consoles[i], ds, text_console_opts[i]);
         qemu_free(text_console_strs[i]);          qemu_opts_del(text_console_opts[i]);
           text_console_opts[i] = NULL;
     }      }
   
     n_text_consoles = 0;      n_text_consoles = 0;
Line 1559  DisplaySurface* defaultallocator_create_ Line 1568  DisplaySurface* defaultallocator_create_
     surface->height = height;      surface->height = height;
     surface->linesize = width * 4;      surface->linesize = width * 4;
     surface->pf = qemu_default_pixelformat(32);      surface->pf = qemu_default_pixelformat(32);
 #ifdef WORDS_BIGENDIAN  #ifdef HOST_WORDS_BIGENDIAN
     surface->flags = QEMU_ALLOCATED_FLAG | QEMU_BIG_ENDIAN_FLAG;      surface->flags = QEMU_ALLOCATED_FLAG | QEMU_BIG_ENDIAN_FLAG;
 #else  #else
     surface->flags = QEMU_ALLOCATED_FLAG;      surface->flags = QEMU_ALLOCATED_FLAG;
Line 1580  DisplaySurface* defaultallocator_resize_ Line 1589  DisplaySurface* defaultallocator_resize_
         surface->data = (uint8_t*) qemu_realloc(surface->data, surface->linesize * surface->height);          surface->data = (uint8_t*) qemu_realloc(surface->data, surface->linesize * surface->height);
     else      else
         surface->data = (uint8_t*) qemu_malloc(surface->linesize * surface->height);          surface->data = (uint8_t*) qemu_malloc(surface->linesize * surface->height);
 #ifdef WORDS_BIGENDIAN  #ifdef HOST_WORDS_BIGENDIAN
     surface->flags = QEMU_ALLOCATED_FLAG | QEMU_BIG_ENDIAN_FLAG;      surface->flags = QEMU_ALLOCATED_FLAG | QEMU_BIG_ENDIAN_FLAG;
 #else  #else
     surface->flags = QEMU_ALLOCATED_FLAG;      surface->flags = QEMU_ALLOCATED_FLAG;
Line 1598  DisplaySurface* qemu_create_displaysurfa Line 1607  DisplaySurface* qemu_create_displaysurfa
     surface->height = height;      surface->height = height;
     surface->linesize = linesize;      surface->linesize = linesize;
     surface->pf = qemu_default_pixelformat(bpp);      surface->pf = qemu_default_pixelformat(bpp);
 #ifdef WORDS_BIGENDIAN  #ifdef HOST_WORDS_BIGENDIAN
     surface->flags = QEMU_BIG_ENDIAN_FLAG;      surface->flags = QEMU_BIG_ENDIAN_FLAG;
 #endif  #endif
     surface->data = data;      surface->data = data;

Removed from v.1.1.1.7  
changed lines
  Added in v.1.1.1.8


unix.superglobalmegacorp.com