~ubuntu-bugs-auftrags-killer/qemu/proper-error-characters

« back to all changes in this revision

Viewing changes to hw/g364fb.c

  • Committer: pbrook
  • Date: 2008-07-01 16:24:38 UTC
  • Revision ID: git-v1:c60e08d9c6bbace33c04dab2b5cacbc42e2e3d47
Implement resolution switching in common console code.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4812 c046a42c-6fe2-441c-8c8c-71466251a162

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    uint8_t palette[256][3];
34
34
    /* display refresh support */
35
35
    DisplayState *ds;
 
36
    QEMUConsole *console;
36
37
    int graphic_mode;
37
38
    uint32_t scr_width, scr_height; /* in pixels */
38
39
    uint32_t last_scr_width, last_scr_height; /* in pixels */
74
75
{
75
76
    if (s->scr_width == 0 || s->scr_height == 0)
76
77
        return;
77
 
    if (s->scr_width != s->last_scr_width
78
 
     || s->scr_height != s->last_scr_height) {
79
 
        s->last_scr_width = s->scr_width;
80
 
        s->last_scr_height = s->scr_height;
81
 
        dpy_resize(s->ds, s->last_scr_width, s->last_scr_height);
82
 
        full_update = 1;
83
 
    }
84
78
 
85
79
    switch (s->ds->depth) {
86
80
        case 8:
272
266
#endif
273
267
                break;
274
268
        }
 
269
        if (s->scr_width && s->scr_height)
 
270
            qemu_console_resize(s->console, s->scr_width, s->scr_height);
275
271
    }
 
272
    s->graphic_mode = -1; /* force full update */
276
273
}
277
274
 
278
275
static void g364fb_ctrl_writew(void *opaque, target_phys_addr_t addr, uint32_t val)
382
379
    s->ds = ds;
383
380
    s->vram_base = vram_base;
384
381
 
385
 
    graphic_console_init(ds, g364fb_update_display,
386
 
                         g364fb_invalidate_display, g364fb_screen_dump,
387
 
                         NULL, s);
 
382
    s->console = graphic_console_init(ds, g364fb_update_display,
 
383
                                      g364fb_invalidate_display,
 
384
                                      g364fb_screen_dump, NULL, s);
388
385
 
389
386
    io_vram = cpu_register_io_memory(0, g364fb_mem_read, g364fb_mem_write, s);
390
387
    cpu_register_physical_memory(s->vram_base, vram_size, io_vram);