diff options
Diffstat (limited to 'hw/jazz_led.c')
-rw-r--r-- | hw/jazz_led.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/hw/jazz_led.c b/hw/jazz_led.c index a3aaec7a0c..fdef9d8150 100644 --- a/hw/jazz_led.c +++ b/hw/jazz_led.c @@ -36,7 +36,6 @@ typedef enum { typedef struct LedState { uint8_t segments; DisplayState *ds; - QEMUConsole *console; screen_state_t state; } LedState; @@ -289,7 +288,7 @@ static void jazz_led_text_update(void *opaque, console_ch_t *chardata) char buf[2]; dpy_cursor(s->ds, -1, -1); - qemu_console_resize(s->console, 2, 1); + qemu_console_resize(s->ds, 2, 1); /* TODO: draw the segments */ snprintf(buf, 2, "%02hhx\n", s->segments); @@ -299,7 +298,7 @@ static void jazz_led_text_update(void *opaque, console_ch_t *chardata) dpy_update(s->ds, 0, 0, 2, 1); } -void jazz_led_init(DisplayState *ds, target_phys_addr_t base) +void jazz_led_init(target_phys_addr_t base) { LedState *s; int io; @@ -308,15 +307,14 @@ void jazz_led_init(DisplayState *ds, target_phys_addr_t base) if (!s) return; - s->ds = ds; s->state = REDRAW_SEGMENTS | REDRAW_BACKGROUND; io = cpu_register_io_memory(0, led_read, led_write, s); cpu_register_physical_memory(base, 1, io); - s->console = graphic_console_init(ds, jazz_led_update_display, - jazz_led_invalidate_display, - jazz_led_screen_dump, - jazz_led_text_update, s); - qemu_console_resize(s->console, 60, 80); + s->ds = graphic_console_init(jazz_led_update_display, + jazz_led_invalidate_display, + jazz_led_screen_dump, + jazz_led_text_update, s); + qemu_console_resize(s->ds, 60, 80); } |