[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 2/2] Enhance sendkey with key hold time
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] Re: [PATCH 2/2] Enhance sendkey with key hold time |
Date: |
Wed, 04 Jun 2008 20:15:36 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
Bernhard Fischer wrote:
> On Wed, Jun 04, 2008 at 12:16:48PM +0200, andrzej zaborowski wrote:
>> On 22/05/2008, Jan Kiszka <address@hidden> wrote:
>
>>> +static void release_keys(void *opaque)
>>> +{
>>> + int keycode;
>>> +
>>> + while (nb_pending_keycodes > 0) {
>
> Perhaps just doing a post decrement on the nb_pending would be cleaner.
I prefer a separate statement for this but...
>
>>> + keycode = keycodes[nb_pending_keycodes-1];
>>> + if (keycode & 0x80)
>>> + kbd_put_keycode(0xe0);
>>> + kbd_put_keycode(keycode | 0x80);
>>> + nb_pending_keycodes--;
>>> + }
I agree that code reordering can save us the "-1".
Thanks,
Jan
signature.asc
Description: OpenPGP digital signature