summaryrefslogtreecommitdiff
path: root/hw/jazz_led.c
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2008-07-01 16:24:38 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2008-07-01 16:24:38 +0000
commitc60e08d9c6bbace33c04dab2b5cacbc42e2e3d47 (patch)
treebe6d94159b698760acaec329da228a44c2ce415f /hw/jazz_led.c
parentea334207a3152e5e4fee4cb82a76233fd43fa14d (diff)
downloadqemu-c60e08d9c6bbace33c04dab2b5cacbc42e2e3d47.tar.gz
qemu-c60e08d9c6bbace33c04dab2b5cacbc42e2e3d47.tar.bz2
qemu-c60e08d9c6bbace33c04dab2b5cacbc42e2e3d47.zip
Implement resolution switching in common console code.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4812 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/jazz_led.c')
-rw-r--r--hw/jazz_led.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/hw/jazz_led.c b/hw/jazz_led.c
index d547138b94..8460bfcd59 100644
--- a/hw/jazz_led.c
+++ b/hw/jazz_led.c
@@ -37,6 +37,7 @@ typedef struct LedState {
target_phys_addr_t base;
uint8_t segments;
DisplayState *ds;
+ QEMUConsole *console;
screen_state_t state;
} LedState;
@@ -291,7 +292,7 @@ static void jazz_led_text_update(void *opaque, console_ch_t *chardata)
char buf[2];
dpy_cursor(s->ds, -1, -1);
- dpy_resize(s->ds, 2, 1);
+ qemu_console_resize(s->console, 2, 1);
/* TODO: draw the segments */
snprintf(buf, 2, "%02hhx\n", s->segments);
@@ -317,7 +318,9 @@ void jazz_led_init(DisplayState *ds, target_phys_addr_t base)
io = cpu_register_io_memory(0, led_read, led_write, s);
cpu_register_physical_memory(s->base, 1, io);
- graphic_console_init(ds, jazz_led_update_display,
- jazz_led_invalidate_display, jazz_led_screen_dump,
- jazz_led_text_update, s);
+ 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);
}