Commit 9043b62d4c3a13e8a47ddfc027fa96c93e7176a5

Authored by blueswir1
1 parent f497f140

Fix nographic mode and VNC

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6391 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 13 additions and 0 deletions
... ... @@ -263,6 +263,7 @@ static int icount_time_shift;
263 263 static int64_t qemu_icount_bias;
264 264 static QEMUTimer *icount_rt_timer;
265 265 static QEMUTimer *icount_vm_timer;
  266 +static QEMUTimer *nographic_timer;
266 267  
267 268 uint8_t qemu_uuid[16];
268 269  
... ... @@ -3414,6 +3415,13 @@ static void gui_update(void *opaque)
3414 3415 qemu_mod_timer(ds->gui_timer, interval + qemu_get_clock(rt_clock));
3415 3416 }
3416 3417  
  3418 +static void nographic_update(void *opaque)
  3419 +{
  3420 + uint64_t interval = GUI_REFRESH_INTERVAL;
  3421 +
  3422 + qemu_mod_timer(nographic_timer, interval + qemu_get_clock(rt_clock));
  3423 +}
  3424 +
3417 3425 struct vm_change_state_entry {
3418 3426 VMChangeStateHandler *cb;
3419 3427 void *opaque;
... ... @@ -5600,6 +5608,11 @@ int main(int argc, char **argv, char **envp)
5600 5608 dcl = dcl->next;
5601 5609 }
5602 5610  
  5611 + if (nographic || (vnc_display && !sdl)) {
  5612 + nographic_timer = qemu_new_timer(rt_clock, nographic_update, NULL);
  5613 + qemu_mod_timer(nographic_timer, qemu_get_clock(rt_clock));
  5614 + }
  5615 +
5603 5616 text_consoles_set_display(display_state);
5604 5617  
5605 5618 if (monitor_device && monitor_hd)
... ...