Commit Graph

45 Commits

Author SHA1 Message Date
Ryan C. Gordon
16cdc59bab Make SDL_SetError and friends unconditionally return -1.
This lets us change things like this...

    if (Failed) {
        SDL_SetError("We failed");
        return -1;
    }

...into this...

    if (Failed) {
        return SDL_SetError("We failed");
    }


 Fixes Bugzilla #1778.
2013-03-31 12:48:50 -04:00
Sam Lantinga
f0af9a3e70 Removed Nintendo DS support since nobody has volunteered to maintain it for over a year. 2013-03-17 09:44:58 -07:00
Ryan C. Gordon
e097576967 First shot at Windows XInput haptics. 2013-03-10 13:05:47 -04:00
Sam Lantinga
019c60c1e8 Happy New Year! 2013-02-15 08:47:44 -08:00
Sam Lantinga
d29e029213 tree 5b46fd5b8c94
parent 971b278f0756
author Edward Rudd <urkle@outoforder.cc> 1358022907 18000
committer Edward Rudd <urkle@outoforder.cc> 1358022907 18000
revision 6819
branch default

Remove some redundant assigns
2013-02-11 21:47:13 -08:00
Ryan C. Gordon
2bd1d1abc4 Move all DirectInput code from DI2 to DI8.
Fixes failing Haptic subsystem initialization on Windows.
2012-11-29 15:24:56 -05:00
Sam Lantinga
23950f0183 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds 2012-11-26 16:37:54 -08:00
Sam Lantinga
b3d60cfcbb Removed executable bit from source files 2012-09-27 14:35:28 -07:00
Ryan C. Gordon
b9790162f5 Fixed a bunch of compiler warnings with Cygwin/MingW. 2012-08-24 19:34:28 -04:00
Ryan C. Gordon
c71bcb5678 Removed some unused variables that gcc 4.6.1 complains about. 2012-08-09 14:14:41 -04:00
Sam Lantinga
1942221a6f Check return value, not unsigned "supported" flags 2011-12-31 13:28:07 -05:00
Sam Lantinga
e256711bb9 Happy New Year! 2011-12-31 09:28:07 -05:00
Ryan C. Gordon
1230f810bd Fixed compiler warning on 64-bit builds. 2011-08-22 13:41:35 -04:00
Ryan C. Gordon
4c406bc202 Cleaned up CoInitialize() politics on Windows. 2011-08-03 04:22:47 -04:00
Sam Lantinga
e2dc086a37 Fixed: Windows always fails with SDL_HapticOpenFromJoystick
The windows function SDL_SYS_HapticOpenFromJoystick fails because DIDEVICEINSTANCE joy_instance does not have its dwSize field initialized.  The attached patch includes the fix along with a fix for two similar problems.

Daniel Heath
2011-04-19 08:08:50 -07:00
Sam Lantinga
6196aa221e SDL 1.3 is now under the zlib license. 2011-04-08 13:03:26 -07:00
Sam Lantinga
5d2d0a1574 Fixed compiler warning 2011-02-20 13:56:57 -08:00
Sam Lantinga
2788694b17 Simple rumble API for haptic
Edgar Simo      2011-02-20 10:27:52 PST

Adding patch that adds a simplified API for the haptic subsystem built ontop of
the "real one" for those who want simple rumble without jumping through hoops.

Adds 4 functions:

- extern DECLSPEC int SDLCALL SDL_HapticRumbleSupported(SDL_Haptic * haptic);
- extern DECLSPEC int SDLCALL SDL_HapticRumbleInit(SDL_Haptic * haptic);
- extern DECLSPEC int SDLCALL SDL_HapticRumblePlay(SDL_Haptic * haptic, float
strength, Uint32 length );
- extern DECLSPEC int SDLCALL SDL_HapticRumbleStop(SDL_Haptic * haptic);

Also provided is test/testrumble.c which does test this.

This has all been tested on linux and has worked, but due to being built ontop
of the other haptic API it should work on all OS the same.
2011-02-20 10:54:44 -08:00
Sam Lantinga
c963d8f53b Untested fix for bug 946 (SDL_HapticIndex returns 0 for all devices)
Edgar Simo      2011-02-20 09:02:31 PST

Linux uses fname, which is the name of the device path like for example
/dev/input/event3 so it shouldn't have the issue. However I can confirm that it
looks like haptic->index never gets properly set on windows. Have to look at
mac os x also. I'll see if I can fix it real quick now.
2011-02-20 09:28:13 -08:00
Sam Lantinga
362639036a Frank Zago to sdl
The following patch fixes some of the bitrot for the Nintendo DS port.
The support is still basic at the moment, but it allows to run the "general"
test under the current head of tree (parent: 5269:11bd1585efb5 tip).
Most of the patch is mine, but I integrated a couple changes that John
Magnotti posted on Feb 1st.
2011-02-12 11:36:56 -08:00
Sam Lantinga
a2cdcf5486 Happy 2011! :) 2011-02-11 22:37:15 -08:00
Sam Lantinga
01fa14dc42 Include windows.h in a single point in the source, so we can be consistent about the definition of UNICODE and have core utility functions for Windows that all modules can share.
I think this also fixes the bug relating to non-latin characters in filenames, since UNICODE wasn't defined in SDL_rwops.c
2011-01-24 21:20:30 -08:00
Sam Lantinga
08ad787807 Fixed bug #925
Changed "win32" to "windows"
2011-01-20 18:04:05 -08:00
Sam Lantinga
d343754786 Fixed compiling with Visual Studio 2008 2010-08-29 14:22:22 -07:00
Sam Lantinga
4df9989dd4 Removed spurious carriage returns 2010-08-22 12:34:31 -07:00
Sam Lantinga
56a9f48542 Fixed compile warning 2010-07-13 22:25:30 -07:00
Sam Lantinga
b90f3fea9c Mostly cleaned up warnings with -Wmissing-prototypes 2010-06-26 08:56:48 -07:00
Sam Lantinga
1741e6f362 Fixed bug #920
From Martin:

Alright... I corrected SDL_SYS_ToDirection in SDL_syshaptic.c in the linux
directory of haptic. Now in all 3 cases the same value is returned, at least.
Therefore now it should behave the same way as on Windows.

I added some comments and corrected the cases SDL_HAPTIC_CARTESIAN and
SDL_HAPTIC_SPHERICAL.
2010-01-18 14:57:41 +00:00
Edgar Simo
2ca41a8224 Patch by Janosch Gräf <janosch.graef@gmx.net>
I just noticed that there are rarely error messages and added some.
2009-08-05 16:31:49 +00:00
Sam Lantinga
8b87364708 Patch from David Carre:
I fixed a bug in the "SDL_DestroyRenderer()" function in the pandora x11 renderer (in fact the bug was in the "X11_GLES_MakeCurrent()" function) that was causing a crash when exiting SDL.

There was a problem while terminating the x11 egl window, that was preventing to quit/close SDL/SDL-window then reload SDL/SDL-window inside the same application.
2009-07-30 14:53:57 +00:00
Edgar Simo
22426af602 More verbosity and error checking. 2009-02-21 18:03:22 +00:00
Sam Lantinga
874db0663d Fixed compilation on Mac OS X 10.3.9 2009-01-19 15:15:03 +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
8f182d2156 indent 2008-11-25 02:21:53 +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
Edgar Simo
37efd9020c Missing an include. 2008-08-26 11:17:16 +00:00
Edgar Simo
f8a242d31e Merged force_feedback_branch r4042: unbuildability of dummy haptic driver with some configurations. 2008-08-25 20:51:03 +00:00
Edgar Simo
14e01ef127 Merge of force feedback branch r4039. 2008-08-25 17:34:58 +00:00
Edgar Simo
4220687185 Merging another last minute fix from force feedback branch (r4036) 2008-08-25 10:14:21 +00:00
Sam Lantinga
b5ce7cc37d Merged last minute fixes from force feedback branch (r4031, r4033, r4034) 2008-08-25 10:04:06 +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