summaryrefslogtreecommitdiffstats
path: root/mp_fifo.c
Commit message (Collapse)AuthorAgeFilesLines
* input: rewrite -key-fifo-size limiting logicUoti Urpala2011-05-021-16/+53
| | | | | | | | | | | | | | | | | | 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.
* input: modify interpretation of doubleclick eventsUoti Urpala2011-05-021-12/+6
| | | | | | | | | | | | | The code combining button presses into multibutton commands prevented single click commands from triggering if a doubleclick event had been generated from the same button press. As a result using the mouse wheel to seek worked very badly. Special-case doubleclick events in the event interpretation code to avoid this issue. This changes the sequence of generated "keys" for press-release-press-release from MOUSE_BTN0 MOUSE_BTN0-MOUSE_BTN0_DBL MOUSE_BTN0_DBL to MOUSE_BTN0 MOUSE_BTN0_DBL MOUSE_BTN0. "Keys" like MOUSE_BTN0-MOUSE_BTN0_DBL will never be generated now; any existing configuration files using those need to be changed.
* input: move all key code lists to input/keycodes.hUoti Urpala2011-05-021-3/+3
| | | | | | | | | | | | | Move the definitions of all special key codes (those not passed by ASCII value) to input/keycodes.h. Before they were spread between osdep/keycodes.h, input/joystick.h, input/mouse.h and input/ar.h, plus some special values in input.h. This was especially inconvenient as the codes had to be coordinated to not conflict between the files. The change requires a bit of ugliness as appleir.c includes <linux/input.h> which contains various conflicting KEY_* definitions. Work around this by adding a special preprocessor variable which can be used to avoid defining these in keycodes.h.
* Merge svn changes up to r30475Uoti Urpala2010-03-091-0/+18
|\
| * Add license header to all top-level files missing them.diego2010-01-301-0/+18
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30471 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Move key_fifo_size & doubleclick_time to options structUoti Urpala2008-04-291-6/+6
| |
* | Add a context for mp_fifoUoti Urpala2008-04-291-50/+61
| | | | | | | | | | Store data in an allocated context and take it as an argument instead of using static variables.
* | mp_fifo.c, osdep/: Include corresponding .h in .c filesUoti Urpala2008-04-291-0/+1
| |
* | input: Remove separate mp_input_add_event_fdUoti Urpala2008-04-291-1/+2
|/ | | | | | | | Use the same mp_input_add_key_fd for all uses and add a context argument to its callback that was before only in the event fd callbacks. Instead of checking in input.c whether keys were inserted to the keypress FIFO during the callback do the check in the callback before returning and set return value accordingly.
* Code cleanup: don't include a .c file in mplayer.c and fix a fewrathann2007-03-291-0/+70
"implicit declaration of function ‘mplayer_put_key’" warnings Based on Attila's suggestions. Approved by Uoti and Ivan. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22841 b3059339-0415-0410-9bf9-f77b7e298cf2