Commit Graph

169 Commits

Author SHA1 Message Date
Sam Lantinga
b0847f3de2 General improvements for user custom event registration
* Switched event type to enum (int32)
* Switched polling by mask to polling by type range
* Added SDL_RegisterEvents() to allow dynamic user event registration
* Spread events out to allow inserting new related events without breaking binary compatibility
* Added padding to event structures so they're the same size regardless of 32-bit compiler structure packing settings
* Split SDL_HasEvent() to SDL_HasEvent() for a single event and SDL_HasEvents() for a range of events
* Added SDL_GetEventState() as a shortcut for SDL_EventState(X, SDL_QUERY)
* Added SDL_FlushEvent() and SDL_FlushEvents() to clear events from the event queue
2010-03-25 01:08:26 -07:00
Edgar Simo
4d5f253244 Disable error checks for reset actuators and set autocenter.
Reset actuators and set autocenter might not actually be supported on all
 implementations. We'll just disable error checking since they aren't
 critical to neither opening the joystick nor the haptic subsystem.
2010-02-28 09:23:23 +00:00
Ryan C. Gordon
6704bb0bcc Merged r5547:5548 from branches/SDL-1.2: FreeBSD joystick uninit'd var fix. 2010-02-05 19:23:59 +00:00
Sam Lantinga
7052036491 Fixed bug #926
Updated copyright to LGPL version 2.1 and year 2010
2010-01-24 21:10:53 +00:00
Ryan C. Gordon
67bd8e2549 Merged r4121:4122 from branches/SDL-1.2: win32 joystick double-free fix. 2010-01-06 07:26:49 +00:00
Ryan C. Gordon
f498df4891 Merged r3787:3788 from branches/SDL-1.2: better failures for joystick opening. 2010-01-06 06:40:16 +00:00
Sam Lantinga
3fc0e26901 Fixed crash in joystick handling code. Newer 2.6 kernels add an additional 'resolution' field to input_absinfo. Note that we don't use that structure since we want to have enough space for the values even when building with an older kernel. 2009-12-17 07:22:48 +00:00
Sam Lantinga
e8d7dbce07 Nuffin' 2009-12-16 01:19:58 +00:00
Sam Lantinga
baf302ec39 Fixed bug #853
Ludwig Nussel      2009-10-18 05:34:18 PDT

src/joystick/linux/SDL_sysjoystick.c has some problems:

- test_bit() might break with strict aliasing
- test_bit() assumes array is Uint32 but its actually "unsigned long"
  on 64bit systems sizeof(long) != sizeof(Uint32).
- the keybit array is too small
- the arrays are unitialized so the number of
  detected buttons is quite random
2009-10-18 16:14:35 +00:00
Sam Lantinga
46d753c1c0 Joystick patch from FreeBSD ports system 2009-10-12 09:42:50 +00:00
Sam Lantinga
44e7c1bd41 Debian patch: 218_joystick_memmove.diff 2009-10-10 10:02:17 +00:00
Sam Lantinga
f694f1de5e Whoops, FreeBSD 6.2 doesn't define __FreeBSD_kernel_version 2009-10-10 09:44:04 +00:00
Sam Lantinga
73b823bca8 Adapted from Debian patch: 215_kfreebsd_gnu.diff 2009-10-10 09:36:12 +00:00
Sam Lantinga
676f56294f Temporary band-aid for bug #575
It looks like newer kernels do the logical device mapping in the driver,
so this code crashes.  I don't have one of these nor do I have remote
access to debug this, so I'm disabling the logical mapping for now.
2009-09-29 00:42:21 +00:00
Sam Lantinga
2d97efbd4d Removed outdated Atari support 2009-09-20 04:15:19 +00:00
Sam Lantinga
6bb854b1d4 Removed outdated Dreamcast support 2009-09-19 07:21:22 +00:00
Sam Lantinga
5bee043a89 Removed outdated OS/2 support 2009-09-19 06:43:45 +00:00
Sam Lantinga
fe959d8e24 Fixed type size for test_bit() 2009-08-02 20:45:11 +00:00
Sam Lantinga
d6c62e184a Fixed undefined references to joystick code 2009-04-03 13:35:05 +00:00
Sam Lantinga
dce3870c54 Fixed potential double-free crash 2009-03-06 05:53:33 +00:00
Edgar Simo
2d0c76a026 Fixed haptic subsystem on linux 2.6.28 by lowering the EV_IsJoystick check (seems like some stuff was changed). Shouldn't break anything with earlier versions. Might need to be more robust if false positives show up. 2009-02-21 18:02:55 +00:00
Couriersud
cb4074788c Fix a 64bit issue in linux/SDL_sysjoystick (int != long on 64bit) 2009-01-11 23:39:11 +00:00
Sam Lantinga
19b003367c Reverted Bob's indent checkin 2009-01-10 21:50:26 +00:00
Bob Pendleton
68ff2ab932 I ran a global "make indent" it modified the following files. 2009-01-09 20:43:30 +00:00
Sam Lantinga
befb0f7f42 Updated copyright date 2008-12-08 00:27:32 +00:00
Sam Lantinga
5ea99603f1 Sort by HID usage, which makes more sense and is more cross-platform 2008-11-08 07:34:21 +00:00
Edgar Simo
ada44e87d4 Fixed compilation on mingw32. 2008-10-14 18:28:28 +00:00
Sam Lantinga
92c3984118 Final merge of Google Summer of Code 2008 work...
Bring SDL to iPhone and iPod Touch
by Holmes Futrell, mentored by Sam Lantinga
2008-10-04 06:46:59 +00:00
Sam Lantinga
258a2014c7 Almost got this compiling on Cygwin32, just needs DirectInput 7 2008-09-15 08:41:03 +00:00
Sam Lantinga
e6e45a547d Updated Visual C++ build 2008-09-15 07:34:36 +00:00
Darren Alton
242cd3897b Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality. 2008-09-06 04:31:34 +00:00
Darren Alton
6fb0102145 Initial work for NDS haptic support. 2008-09-06 00:10:16 +00:00
Sam Lantinga
9c4b835e49 Final merge of Google Summer of Code 2008 work...
Port SDL 1.3 to the Nintendo DS
by Darren Alton, mentored by Sam Lantinga
2008-08-27 15:10:03 +00:00
Edgar Simo
14e01ef127 Merge of force feedback branch r4039. 2008-08-25 17:34:58 +00:00
Sam Lantinga
a6fa308712 Final merge of Google Summer of Code 2008 work...
Force Feedback for SDL
by Edgar Simo, mentored by Ryan C. Gordon
2008-08-25 09:55:03 +00:00
Bob Pendleton
e065abc334 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob. 2008-01-08 00:10:46 +00:00
Sam Lantinga
67aa85911e Fixed bug #478
Take the min and max values into account.
2007-12-29 19:45:09 +00:00
Sam Lantinga
6ca8994f51 Fixed bug #497
Check all joysticks instead of stopping if one has been removed.
2007-12-29 06:17:31 +00:00
Sam Lantinga
c53b963473 Split acinclude.m4 into its component parts for easy updating 2007-07-15 01:51:11 +00:00
Patrice Mandin
449514cde4 Missing variable declarations 2007-07-14 00:03:04 +00:00
Sam Lantinga
d92137dfe0 Fixed joystick name detection - merged from revision 3226 on SDL 1.2 branch 2007-07-12 05:31:08 +00:00
Sam Lantinga
b6ab6bf6d5 make indent 2007-06-14 13:21:29 +00:00
Sam Lantinga
defc2572f2 Fixed build issues on Mac OS X 2007-05-31 14:46:01 +00:00
Ryan C. Gordon
5045fc5ea4 Merged r3029:3030 from branches/SDL-1.2: Mac OS X joystick axis fix. 2007-05-29 12:14:16 +00:00
Ryan C. Gordon
62073d041d Merged r2992:2993 from branches/SDL-1.2: Mac OS X multi-axis joystick support. 2007-03-18 22:39:24 +00:00
Ryan C. Gordon
f19750fb44 Added id of another buggy Microsoft SideWinder to the Linux joystick driver.
Fixes Bugzilla #395.
2007-02-20 22:54:25 +00:00
Ryan C. Gordon
b94f08253a Removed AmigaOS code for 1.3 branch. 2006-10-29 04:09:17 +00:00
Ryan C. Gordon
a08b4ac133 Win32 joystick fix, ported from 1.2 branch r2887:2888. (Thanks, Ondrej!)
Fixes Bugzilla #267.
2006-10-29 03:39:13 +00:00
Sam Lantinga
9d4b500741 Formatting update 2006-09-24 15:56:55 +00:00
Patrice Mandin
60767d528e Add teamtap support 2006-09-16 17:13:41 +00:00