From 68f00996405e899688e56249fd1e7c7810f67dbb Mon Sep 17 00:00:00 2001 From: aliguori Date: Wed, 21 Jan 2009 18:59:12 +0000 Subject: fix curses interface (Stefano Stabellini) Hi all, this patch fixes the curses interface: when we switch from one console to another we need to change the displaystate width and height even though in the curses case the backing buffer remains of the same size. I am also putting back the call to text_console_resize in text_console_invalidate so that resizeable text consoles can be properly handled. Signed-off-by: Stefano Stabellini Signed-off-by: Anthony Liguori git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6389 c046a42c-6fe2-441c-8c8c-71466251a162 --- curses.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'curses.c') diff --git a/curses.c b/curses.c index b3aa011..97ab412 100644 --- a/curses.c +++ b/curses.c @@ -106,6 +106,8 @@ static void curses_resize(DisplayState *ds) gheight = ds_get_height(ds); curses_calc_pad(); + ds->surface->width = width * FONT_WIDTH; + ds->surface->height = height * FONT_HEIGHT; } #ifndef _WIN32 @@ -367,7 +369,7 @@ void curses_display_init(DisplayState *ds, int full_screen) dcl->dpy_text_cursor = curses_cursor_position; register_displaychangelistener(ds, dcl); qemu_free_displaysurface(ds->surface); - ds->surface = qemu_create_displaysurface_from(80, 25, 0, 0, (uint8_t*) screen); + ds->surface = qemu_create_displaysurface_from(640, 400, 0, 0, (uint8_t*) screen); invalidate = 1; -- cgit v1.1