Commit graph

5632 commits

Author SHA1 Message Date
Sam Lantinga
3afbe992d5 Removed Nintendo DS support since nobody has volunteered to maintain it for over a year. 2013-03-17 09:44:58 -07:00
Sam Lantinga
72befa7332 We have a new platform, yay! 2013-03-17 09:21:08 -07:00
Captain Lex
47dac69dc7 Add PSP support 2013-03-17 20:07:02 +08:00
Sam Lantinga
f227d45db9 Fixed more const issues with C++ 2013-03-16 11:00:04 -07:00
Sam Lantinga
6509d6080b Fixed XIM crash when locale is set to something not supported by X11. 2013-03-15 11:59:16 -07:00
Sam Lantinga
77815e31db Fixed const correctness issue with C++, and fixed building SDL_memcpy4 with 32-bit gcc. 2013-03-15 11:56:28 -07:00
Sam Lantinga
6ea7a3490d Clarified inline function documentation, removed obsolete Metrowerks compiler directive. 2013-03-14 23:10:51 -07:00
Ryan C. Gordon
a26645f7b1 Replace all the "static __inline__" functions with SDL_FORCE_INLINE. 2013-03-15 01:09:19 -04:00
Ryan C. Gordon
7e934f8f75 Improvements to stdlib.
All SDL_* functions are always available as real symbols, so you can always
link against them as a stable ABI. By default, however, all the things that
might have dithered down to macros in your application are now force-inlined,
to give you the same effect as before and theoretically better performance,
but still solve the classic macro problems.

Elsewhere, we provide real functions for these things that simply wrap the
inline functions, in case one needs to have a real function available.

Also: this exposed bugs: SDL_abs() does something different if you had the
macro vs the libc function, SDL_memcpy() returns a void* in the function
but not the macro, etc.
2013-03-15 01:01:20 -04:00
Ryan C. Gordon
e79e3b2343 Added an SDL_FORCE_INLINE macro. 2013-03-15 01:02:30 -04:00
Sam Lantinga
124288fdb9 XDnD implementation from Davey Taylor, need some cleanup 2013-03-13 21:41:43 -07:00
Andreas Schiffler
d1c430023f Reformat SDL_VS2010.sln so WindowsExplorer VS type detection works again 2013-03-13 09:14:45 -07:00
Andreas Schiffler
42a673ce23 Fix bug 122 - SDL_RWops bug fixes: set RWops.type field, add input validation, add test coverage 2013-03-13 08:35:03 -07:00
Jørgen P. Tjernø
ae480eecfd Missing comma in one gamepad mapping. 2013-03-12 18:28:40 -07:00
Jørgen P. Tjernø
fc436807a8 Add GameController mappings for popular controllers.
This adds mappings for:
  - Another type of wired X360 controller
  - A wireless X360 controller
  - Logitech F710 (XInput and DInput modes)
  - Logitech F310 (XInput mode)
  - Logitech Cordless RumblePad 2
2013-03-12 18:28:36 -07:00
Andreas Schiffler
6a2bff0cd1 Fix bug 1560 - SDL_RWFromConstMem write operation returns -1 but should return 0. 2013-03-12 09:10:37 -07:00
Sam Lantinga
f25403ba28 Fixed bug 1751 - Direcftb renderer viewport behaviour differs from API description.
tomaszewski.p

According to API description:
SDL_RenderSetViewport - Use this function to set the drawing area for rendering on the current target.

DirectFB renderer in DirectFB_UpdateViewport function just sets clip on surface, instead of moving drawing area.

Attached patch uses set clip rectangle to move {x,y} coordinates during draw and blit operations to be compatible with API description.
2013-03-10 21:10:10 -07:00
Andreas Schiffler
5bffed4b32 Fix bug 1574 - updaterev.sh fails when path contains spaces 2013-03-10 16:28:20 -07:00
Ryan C. Gordon
8181152c53 Patched to compile on Visual Studio. 2013-03-10 13:36:20 -04:00
Ryan C. Gordon
f34606e325 Fixed compiler warning. 2013-03-10 13:31:55 -04:00
Ryan C. Gordon
2e19fefe52 Attempt to get XInput haptics building on Cygwin (or rather, avoid building). 2013-03-10 13:28:39 -04:00
Ryan C. Gordon
3d572bdf89 First shot at Windows XInput haptics.
--HG--
extra : rebase_source : 52e691a0917d173e891e67714a135373daea0ef5
2013-03-10 13:05:47 -04:00
Sam Lantinga
203b9839d2 Fixed bug 1750 - Directfb renderer does not support SDL_RENDERER_TARGETTEXTURE
tomaszewski.p

DirectFB renderer does not support SDL_RENDERER_TARGETTEXTURE what makes it incompatible with GL or GLES(2) renderers.

Attached patched:
- adds support for SDL_RENDERER_TARGETTEXTURE,
- DirectFB RenderCopy converts destination rectangle from floats to ints,
- fixes whitespaces to be the same in whole file.
2013-03-10 09:09:31 -07:00
Sam Lantinga
2422c520ac Fixed bug 1749 - SDL_GL_CreateContext() causes fatal X11 protocol errors that should just be caught instead
Lee Salzman

When using SDL_GL_CreateContext() to create a >= 3.0 version or core/forward-compatible context, internally glXCreateContextAttribsARB is used. Mesa in particular seems to be having trouble with this call and returning all sorts of errors, so it is dangerous to poll for the highest GL version by using calls to SDL_GL_CreateContext unless you are sure, a priori, that the call will suceed, defeating the point of its use.

X11 protocol errors are of the following form, with varying details depending on user, but the cause is always SDL_GL_CreateContext as above...

X Error of failed request:  GLXBadFBConfig
  Major opcode of failed request:  153 (GLX)
  Minor opcode of failed request:  34 ()
  Serial number of failed request:  215
  Current serial number in output stream:  221

These sorts of errors can be temporarily filtered out by setting an X11 error handler to catch and ignore them, which is safe with respect to SDL_GL_CreateContext behavior because this function is allowed to return NULL to indicate failure.

A patch is attached to do this temporary filtering/catching of errors generated by trying to use glXCreateContextAttribs and friends...
2013-03-10 09:07:23 -07:00
Sam Lantinga
1bb2a06fc7 Fixed bug 1748 - Patch for errors and mistakes in SDL 2 README files.
Philipp Wiesemann

SDL's README files seem to contain multiple errors and mistakes. I attached a patch with changes and updates.

README:
 * removed Windows CE because no more supported

README-SDL.txt:
 * corrected spelling mistake

README.DirectFB:
 * corrected spelling mistakes

README.MacOSX:
 * corrected spelling mistakes

README.Platforms:
 * changed Android version to match AndroidManifest.xml

README.Porting:
 * added missing directories from list
 * removed cdrom directories from list

README.android:
 * updated required NDK revision
 * add project.properties to list
 * changed lower limit for to android-10 and removed upper
 * added a statement why older devices not supported
 * added correct dates to statements about OpenGL ES
 * added info about Google's device numbers and date
 * corrected spelling mistakes

README.gesture:
 * corrected spelling mistakes

README.pandora:
 * corrected spelling mistake

README.touch:
 * changed that values are no in range 0..1
 * updated the names of some functions
 * updated the notes about usage
 * corrected spelling mistakes
 * added info that API changed near original author contact
2013-03-10 09:03:38 -07:00
Sam Lantinga
7ce1b4475f Fixed bug 1744 - DirectFB video and renderer API is not updated
tomaszewski.p

Recent changes in SDL_sysrenderer.h and SDL_sysvideo.h had no impact on directfb backend.

Attached patch:
- updates interface,
- resolves uninitialized variable reading,
- changes logging tio use SDL_Log API,
- updates configure to use DIRECTFBCONFIG variable instead direct call to directfb-config.
2013-03-09 10:35:12 -08:00
Andreas Schiffler
c51712467d Fix SDL_TryLockMutex compile error when FAKE_RECURSIVE_MUTEX is defined 2013-03-09 09:24:43 -08:00
Andreas Schiffler
edbf26b139 Add parameter checking to SetWindowSize functions; add tests to video suite 2013-03-08 23:33:07 -08:00
Andreas Schiffler
5916b2bc1e Fix Bug 1533 - SDL_Keycode value range allows segfaults with negative values; add test coverage to keyboard suite 2013-03-08 23:04:53 -08:00
Sam Lantinga
f41de44a36 Updated SDL_HINT_GAMECONTROLLERCONFIG documentation to reflect that it only takes effect before init. 2013-03-08 16:27:05 -08:00
Ryan C. Gordon
bd9fdb8099 Changed SDL_INIT_EVERYTHING to only request currently-known subsystems. 2013-03-08 11:38:08 -05:00
Sam Lantinga
7f2340dc6a Don't re-read the hints when opening the game controller. Instead use SDL_GameControllerAddMapping() to add hints after initialization. 2013-03-08 10:09:51 -08:00
Gabriel Jacobo
3f118b42fe README.android updates regarding the use of dirty rectangles rendering technique 2013-03-08 11:30:25 -03:00
Sam Lantinga
1494812f7c Put the real SDL_AtomicCAS() and SDL_AtomicCASPtr() symbols into the library. 2013-03-07 20:42:55 -08:00
Sam Lantinga
c6388c87c1 Changed the name of SDL_mutexP() SDL_mutexV() 2013-03-07 20:12:40 -08:00
Sam Lantinga
0707530b35 Load the game controller mapping hint when opening a game controller. 2013-03-07 15:37:08 -08:00
Sam Lantinga
1dec4dd800 Fixed read after free bug in the game controller. 2013-03-07 15:17:06 -08:00
Sam Lantinga
69b8182419 The joystick events contain a joystick instance ID, which is a signed value, with -1 being invalid. 2013-03-06 11:59:21 -08:00
Sam Lantinga
fb49761922 Fixed 64-bit compile warnings on Visual C++ 2013-03-06 11:59:19 -08:00
Sam Lantinga
85d6d00788 Removed multi-input events, since we removed the unimplemented API recently. 2013-03-06 11:59:15 -08:00
Sam Lantinga
541a638836 Fixed compile errors on Windows 2013-03-06 09:45:53 -08:00
Sam Lantinga
4a942814bd Make it so SDL_RestoreWindow() implements the _NET_ACTIVE_WINDOW protocol which some window managers require to restore full screen windows. CR: saml 2013-03-06 09:37:03 -08:00
Edward Rudd
3ab8d4ce1a move variable declaration to beginning of function 2013-03-06 10:37:27 -05:00
Sam Lantinga
4e631c1583 Fixed warning messages when loading Direct3D DLL
kmx

I have investigated the warning "Failed loading D3DX9_*.dll" and come up with the enclosed patch (please forward it to relevant SDL2 mailing list/bugtracker).
2013-03-05 18:52:25 -08:00
Shawn Walker
6398f00da7 Fix pulseaudio dynamic linking for Solaris builds.
Fix Solaris Studio compilation errors.
Fix sunaudio backend for SDL2.
2013-02-25 22:46:21 +00:00
Edward Rudd
ac51aff110 Add SDL_TryLockMutex and implementations for all platforms 2013-03-05 18:54:55 -05:00
Edward Rudd
191718be44 add hint to allow disabling the use of Xinput. 2013-03-05 18:01:59 -05:00
Edward Rudd
5fd98b3297 add new gamecontroller APIs
- add mappings after init (or even before w/o using the hint)
- get string for axis
- get string for button
- get mapping string for controller or for GUID
- new event to notify when a controller is remapped. (e.g. mapping was changed via the AddMapping method)
2013-03-05 17:59:36 -05:00
Sam Lantinga
979239e130 Fixed bug 1553 - Fix USB joystick input for FreeBSD 9.0+
Marcus von Appen

Receiving input from USB joysticks on FreeBSD 9.0 or newer is broken at the moment. The attached patch fixes this.
2013-03-04 20:27:51 -08:00
Gabriel Jacobo
0d5cf5e924 Updated the README.android file stating the required API level and reasons why. 2013-03-04 11:35:03 -03:00