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