qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH v7 21/21] replay: recording of the user inpu


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [RFC PATCH v7 21/21] replay: recording of the user input
Date: Mon, 12 Jan 2015 13:25:20 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0


On 12/01/2015 13:01, Pavel Dovgalyuk wrote:
> +void qemu_input_event_send(QemuConsole *src, InputEvent *evt)
>  {
> -    QemuInputHandlerState *s;
> -
>      if (!runstate_is_running() && !runstate_check(RUN_STATE_SUSPENDED)) {
>          return;
>      }
>  
> +    if (replay_mode == REPLAY_MODE_PLAY) {
> +        /* Nothing */
> +    } else if (replay_mode == REPLAY_MODE_RECORD) {
> +        replay_add_input_event(evt);
> +    } else {
> +        qemu_input_event_send_impl(src, evt);
> +    }

Similar to other cases, please wrap this into a single function,
something like

    if (replay_handle_input_event(evt)) {
        return;
    }

    /* ... original contents of qemu_input_event_send ... */

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]