summaryrefslogtreecommitdiffstats
path: root/input/joystick.c
Commit message (Collapse)AuthorAgeFilesLines
* input: remove Linux joystick supportwm42015-03-241-216/+0
| | | | | | | | | | | Why did this exist in the first place? Other than being completely useless, this even caused some regressions in the past. For example, there was the case of a laptop exposing its accelerometer as joystick device, which led to extremely fun things due to the default mappings of axis movement being mapped to seeking. I suppose those who really want to use their joystick to control a media player (???) can configure it as mouse device or so.
* Do not call strerror()wm42014-11-261-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | ...because everything is terrible. strerror() is not documented as having to be thread-safe by POSIX and C11. (Which is pretty much bullshit, because both mandate threads and some form of thread-local storage - so there's no excuse why implementation couldn't implement this in a thread-safe way. Especially with C11 this is ridiculous, because there is no way to use threads and convert error numbers to strings at the same time!) Since we heavily use threads now, we should avoid unsafe functions like strerror(). strerror_r() is in POSIX, but GNU/glibc deliberately fucks it up and gives the function different semantics than the POSIX one. It's a bit of work to convince this piece of shit to expose the POSIX standard function, and not the messed up GNU one. strerror_l() is also in POSIX, but only since the 2008 standard, and thus is not widespread. The solution is using avlibc (libavutil, by its official name), which handles the unportable details for us, mostly. We avoid some pain.
* input: remove useless joystick.h/lirc.h include fileswm42014-09-101-3/+0
| | | | These really just waste space.
* input: use an input thread for joystickwm42014-09-101-15/+49
|
* Kill all tabswm42014-04-131-19/+19
| | | | | | | | | | | I hate tabs. This replaces all tabs in all source files with spaces. The only exception is old-makefile. The replacement was made by running the GNU coreutils "expand" command on every file. Since the replacement was automatic, it's possible that some formatting was destroyed (but perhaps only if it was assuming that the end of a tab does not correspond to aligning the end to multiples of 8 spaces).
* joystick: Fix incorrect pointer offset code.reimar2014-04-101-1/+1
| | | | | | | I have some doubts that short reads are even allowed/ possible for /dev/js*, does someone know for sure? git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@37132 b3059339-0415-0410-9bf9-f77b7e298cf2
* input: rework how input sources are addedwm42013-12-211-28/+46
| | | | | | | | | | | | | | Until now, there were two functions to add input sources (stuff like stdin input, slave mode, lirc, joystick). Unify them to a single function (mp_input_add_fd()), and make sure the associated callbacks always have a context parameter. Change the lirc and joystick code such that they take store their state in a context struct (probably worthless), and use the new mp_msg replacements (the point of this refactoring). Additionally, get rid of the ugly USE_FD0_CMD_SELECT etc. ifdeffery in the terminal handling code.
* Split mpvcore/ into common/, misc/, bstr/wm42013-12-171-1/+1
|
* Move mpvcore/input/ to input/wm42013-12-171-0/+162
|
* Rename directories, move files (step 1 of 2) (does not compile)wm42012-11-121-162/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tis drops the silly lib prefixes, and attempts to organize the tree in a more logical way. Make the top-level directory less cluttered as well. Renames the following directories: libaf -> audio/filter libao2 -> audio/out libvo -> video/out libmpdemux -> demux Split libmpcodecs: vf* -> video/filter vd*, dec_video.* -> video/decode mp_image*, img_format*, ... -> video/ ad*, dec_audio.* -> audio/decode libaf/format.* is moved to audio/ - this is similar to how mp_image.* is located in video/. Move most top-level .c/.h files to core. (talloc.c/.h is left on top- level, because it's external.) Park some of the more annoying files in compat/. Some of these are relicts from the time mplayer used ffmpeg internals. sub/ is not split, because it's too much of a mess (subtitle code is mixed with OSD display and rendering). Maybe the organization of core is not ideal: it mixes playback core (like mplayer.c) and utility helpers (like bstr.c/h). Should the need arise, the playback core will be moved somewhere else, while core contains all helper and common code.
* input/joystick.c: add #include missing from 23cb829072Uoti Urpala2011-05-031-0/+1
| | | | | There was a '#include "keycodes.h"' line missing from commit 23cb829072, which broke build with --enable-joystick.
* Delete things related to old translation systemUoti Urpala2010-03-101-1/+0
| | | | | Remove the help/ subdirectory, configure code to create toplevel help_mp.h, and all the '#include "help_mp.h"' lines from .c files.
* Remove trailing whitespace from most filesUoti Urpala2009-07-071-11/+11
|
* Translation system changes part 2: replace macros by stringsAmar Takhar2009-07-071-9/+9
| | | | | Replace all MSGTR_ macros in the source by the corresponding English string.
* Translation system changes part 1: wrap translated stringsAmar Takhar2009-07-071-9/+9
| | | | | Replace mp_msg() calls which have a translated string as the format argument with mp_tmsg and add _() around all other translated strings.
* Merge svn changes up to r28149Uoti Urpala2008-12-141-0/+17
|\
| * Add standard GPL license header.diego2008-12-131-0/+17
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28146 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r26979Uoti Urpala2008-06-041-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the conflicts are trivial. Conflicts: Makefile cfg-mplayer.h input/input.c libmenu/vf_menu.c libmpcodecs/dec_video.c libmpcodecs/vf_expand.c libmpcodecs/vf_vo.c libmpdemux/demux_mkv.c libmpdemux/demuxer.c libmpdemux/demuxer.h libvo/vo_directfb2.c libvo/vo_gl.c libvo/vo_winvidix.c libvo/vo_xv.c libvo/vo_xvidix.c libvo/vo_xvmc.c libvo/x11_common.c mplayer.c osdep/timer-linux.c stream/cache2.c
| * cosmetics: Remove useless parentheses from return statements.diego2008-05-161-2/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26791 b3059339-0415-0410-9bf9-f77b7e298cf2
* | input: Remove separate mp_input_add_event_fdUoti Urpala2008-04-291-1/+1
|/ | | | | | | | 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.
* joystick.c is only ever compiled on Linux, remove pointless #ifdefdiego2008-02-281-17/+0
| | | | | | | around the whole file and dummy functions. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26112 b3059339-0415-0410-9bf9-f77b7e298cf2
* typo fix: inited --> initializeddiego2008-02-141-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25994 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add comments to some preprocessor directives.diego2007-06-271-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23683 b3059339-0415-0410-9bf9-f77b7e298cf2
* buggy joystick initialization, works much better without thisben2007-05-191-1/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23348 b3059339-0415-0410-9bf9-f77b7e298cf2
* slight overall verbosity reductiondiego2006-10-121-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20191 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move conditional compilation to the build system.diego2006-09-121-4/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19807 b3059339-0415-0410-9bf9-f77b7e298cf2
* prevent overflow.. wtf?! from irc:rfelker2006-03-311-1/+1
| | | | | | | | | | <@tcsetattr> how many dimensions can people have in a joystick? do you travel to other universes with that thing? [apparently more than 10...?!] (reported on irc by DrewZzz) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18006 b3059339-0415-0410-9bf9-f77b7e298cf2
* Unify include paths, -I.. is in CFLAGS.diego2005-10-251-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16861 b3059339-0415-0410-9bf9-f77b7e298cf2
* printf to mp_msgreynaldo2005-10-251-9/+12
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16856 b3059339-0415-0410-9bf9-f77b7e298cf2
* output typo fixes: unknow --> unknowndiego2003-07-091-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10398 b3059339-0415-0410-9bf9-f77b7e298cf2
* 10L bugfixalbeu2002-05-231-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6157 b3059339-0415-0410-9bf9-f77b7e298cf2
* Added support for key combination and mouse buttons key codealbeu2002-02-081-6/+38
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4590 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix the bugs the previous version should fix (and those introducedalbeu2002-02-041-67/+6
| | | | | | | by the previous version ;) ) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4525 b3059339-0415-0410-9bf9-f77b7e298cf2
* Corrected the quit bug and added support for up to 10 axisalbeu2002-02-031-4/+34
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4519 b3059339-0415-0410-9bf9-f77b7e298cf2
* A new configurable input system and joystick support for this systemalbeu2002-01-301-0/+163
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4419 b3059339-0415-0410-9bf9-f77b7e298cf2