input: rewrite -key-fifo-size limiting logic
commit5c4b059f1608f6d6a981b7d81a14f1c46e40ba52
authorUoti Urpala <uau@mplayer2.org>
Sun, 1 May 2011 12:57:39 +0000 (1 15:57 +0300)
committerUoti Urpala <uau@mplayer2.org>
Sun, 1 May 2011 21:44:21 +0000 (2 00:44 +0300)
treea44d6824a334b23dd16ee60ef06302c973b00b28
parentb9eaafe1ed4f38efcd08d113d9e51e9ebb034f6e
input: rewrite -key-fifo-size limiting logic

Instead of strictly limiting the number of total entries in the
internal fifo, make the overall buffer bigger and try to limit entries
based on how many bound commands they're expected to generate. Now
doubleclick and button down events aren't counted for that limit.
Normally the sequence down-doubleclick-up generates at most one
command, so this better matches the quantity we actually want to
limit. Also add a mechanism to clear the button combination state kept
by input.c when the fifo is full; this avoids "stuck button" problems
due to button release events being dropped.

The key combination state clearing is partially based on MPlayer 1
changes by Reimar Döffinger (though overall the effects of this commit
are quite different). It still doesn't make "stuck button" problems
completely impossible; at least if the VO gets closed while a button
was down then nothing will send a button up event or reset state.
DOCS/man/en/mplayer.1
input/input.c
input/input.h
mp_fifo.c