From: balrog Date: Mon, 9 Jun 2008 00:03:47 +0000 (+0000) Subject: Fix the sendkey hold time calculation (Jan Kiszka). X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f227f17d1b4f21b681c94efce859b9094482b7e6;p=qemu.git Fix the sendkey hold time calculation (Jan Kiszka). git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4703 c046a42c-6fe2-441c-8c8c-71466251a162 --- diff --git a/monitor.c b/monitor.c index 002fc0286c..1eb8be1ed4 100644 --- a/monitor.c +++ b/monitor.c @@ -982,8 +982,8 @@ static void do_sendkey(const char *string, int has_hold_time, int hold_time) kbd_put_keycode(keycode & 0x7f); } /* delayed key up events */ - qemu_mod_timer(key_timer, - qemu_get_clock(vm_clock) + ticks_per_sec * hold_time); + qemu_mod_timer(key_timer, qemu_get_clock(vm_clock) + + muldiv64(ticks_per_sec, hold_time, 1000)); } static int mouse_button_state;