From 9043b62d4c3a13e8a47ddfc027fa96c93e7176a5 Mon Sep 17 00:00:00 2001 From: blueswir1 Date: Wed, 21 Jan 2009 19:28:13 +0000 Subject: [PATCH] Fix nographic mode and VNC git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6391 c046a42c-6fe2-441c-8c8c-71466251a162 --- vl.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/vl.c b/vl.c index 7f983cf..045b09f 100644 --- a/vl.c +++ b/vl.c @@ -263,6 +263,7 @@ static int icount_time_shift; static int64_t qemu_icount_bias; static QEMUTimer *icount_rt_timer; static QEMUTimer *icount_vm_timer; +static QEMUTimer *nographic_timer; uint8_t qemu_uuid[16]; @@ -3414,6 +3415,13 @@ static void gui_update(void *opaque) qemu_mod_timer(ds->gui_timer, interval + qemu_get_clock(rt_clock)); } +static void nographic_update(void *opaque) +{ + uint64_t interval = GUI_REFRESH_INTERVAL; + + qemu_mod_timer(nographic_timer, interval + qemu_get_clock(rt_clock)); +} + struct vm_change_state_entry { VMChangeStateHandler *cb; void *opaque; @@ -5600,6 +5608,11 @@ int main(int argc, char **argv, char **envp) dcl = dcl->next; } + if (nographic || (vnc_display && !sdl)) { + nographic_timer = qemu_new_timer(rt_clock, nographic_update, NULL); + qemu_mod_timer(nographic_timer, qemu_get_clock(rt_clock)); + } + text_consoles_set_display(display_state); if (monitor_device && monitor_hd) -- 2.7.4