Commit graph

1078 commits

Author SHA1 Message Date
Sam Lantinga
890d7ee576 Updated the license listed in the header, fixing bug 1768 2013-03-23 13:03:36 -07:00
Sam Lantinga
db141a68e8 Fixed bug 1764 - Integer Precision Loss During Compilation
Phil Sampson

/Library/Frameworks/SDL2.framework/Headers/SDL_stdinc.h:345:28: Implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int'
2013-03-19 22:02:34 -07:00
Sam Lantinga
fecccf1718 Fixed bug 1763 - Constify SDL_UpdateWindowSurfaceRects()
Ryan C. Gordon

With this function...
   SDL_UpdateWindowSurfaceRects(SDL_Window * window, SDL_Rect * rects, int numrects);
...is there any reason rects isn't "const SDL_Rect *" ?
2013-03-19 21:53:33 -07:00
Sam Lantinga
e64abd6e47 The platform define for the PSP is __PSP__ 2013-03-17 09:45:40 -07:00
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
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
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
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
Andreas Schiffler
6a2bff0cd1 Fix bug 1560 - SDL_RWFromConstMem write operation returns -1 but should return 0. 2013-03-12 09:10:37 -07:00
Ryan C. Gordon
3d572bdf89 First shot at Windows XInput haptics.
--HG--
extra : rebase_source : 52e691a0917d173e891e67714a135373daea0ef5
2013-03-10 13:05:47 -04:00
Andreas Schiffler
edbf26b139 Add parameter checking to SetWindowSize functions; add tests to video suite 2013-03-08 23:33:07 -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
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
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
85d6d00788 Removed multi-input events, since we removed the unimplemented API recently. 2013-03-06 11:59:15 -08: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
bb0752e573 Updated touch API
* Normalized touch coordinates as floats in the 0...1 range
* Removed unused touchpad concepts from the API
* Added API functions to get active touch devices and current finger state
2013-03-03 01:01:33 -08:00
Sam Lantinga
71ea3033fa Added a mouse ID to the mouse events, which set to the special value SDL_TOUCH_MOUSEID for mouse events simulated by touch input. 2013-03-02 20:44:16 -08:00
Sam Lantinga
c02018f852 Fixed the joystick id usage in the joystick and game controller events. 2013-03-02 17:51:32 -08:00
Sam Lantinga
43f89a9836 Updated the link to the USB usage page document 2013-02-28 20:01:17 -08:00
Sam Lantinga
2204530a1b Fixed gcc pedantic warnings in public headers 2013-02-26 20:41:28 -08:00
Jørgen P. Tjernø
a3482e3ac0 sdl2
- fix atomic header to compile happily under msvc 6.0
2013-02-25 16:52:48 -08:00
Jørgen P. Tjernø
cf58b77360 sdl2
- change the windows scancode logic to use the scan code value in lparam rather than VK's to get a stable scancode value across different KB layouts
2013-02-25 16:52:42 -08:00
Ryan C. Gordon
ad1d82cf83 Added SDL_GameControllerUpdate(). 2013-02-25 01:51:21 -05:00
Ryan C. Gordon
4de257c5d2 Added SDL_haptic.h to SDL.h. 2013-02-25 01:50:59 -05:00
Ryan C. Gordon
a5862a96a3 Changed the game controller enum types to match SDL naming conventions. 2013-02-25 00:56:21 -05:00
Sam Lantinga
70132c66ae The input API was never implemented, so removing it before release. 2013-02-19 05:39:19 -08:00
Sam Lantinga
95dcfa4c28 Happy New Year! 2013-02-15 08:47:44 -08:00
Sam Lantinga
909068989c Updated documentation with info about the wiki
We're no longer under construction, baby!
2013-02-14 15:56:33 -08:00
Andreas Schiffler
edbd20ec34 Add tests to SDLtest suite 2013-02-13 23:10:29 -08:00
Jørgen P. Tjernø
6fee8913ec New SDL_MSBIndex, updated VS projects, cleanup gamecontroller.
- Updated Visual Studio 2010 project with SDL 2.0 library names
- Don't use a 256 byte LUT, but rather <32 bytes of data on the stack.
- Cleanups in SDL_gamecontroller.h

--HG--
extra : amend_source : e7d1b224d1356c5be7a89df7b82a7f5e1141c167
2013-02-13 17:19:21 -08:00
Andreas Schiffler
ea312e87fa Fix fuzzer random boundary functions; add tests for fuzzer 2013-02-12 22:23:42 -08:00
Jørgen P. Tjernø
e34e953eba Check bounds in SDL_IsGameController. Switch two functions to SDL_bool.
Switches SDL_GameControllerGetAttached and SDL_IsGameController to
       return SDL_bool, instead of int.
2013-02-12 17:07:21 -08:00
Jørgen P. Tjernø
f85aeb98c7 Don't clobber refcounting in SDL_Init.
- Fixes bug 1712 by not overwriting SDL_SubsystemRefCount in SDL_Init.
       - Removes the SDL_initialized variable, and makes SDL_SubsystemRefCount
         the canonical source of truth for whether or not a subsystem has been
         initialized.
       - Refactors SDL_InitSubSystem and SDL_QuitSubSystem to use helper
         functions to manage refcount.
       - Adds automated tests for SDL_Init/Quit*.
       - Adds SDL_bits.h which contains SDL_MostSignificantBitIndex.
2013-02-12 11:47:31 -08:00
Sam Lantinga
831e12e08b Fixed building SDL under Xcode 2013-02-11 11:09:55 -08:00
Sam Lantinga
4809ef4290 Fixed typo in documentation 2013-01-27 15:53:24 -08:00
Tim Angus
bd462555d7 Fix warning in SDL_keyboard.h 2013-01-17 11:54:14 +00:00
Andreas Schiffler
b4a190fb6f Update SDL_InvalidParamError to take param name; add additional fuzzer function; add new tests to keyboard test suite; improve surface test suite 2013-01-12 22:58:12 -08:00
Andreas Schiffler
a20096403e Add new internal error message for invalid parameters; add validation of input rect in SDL_SetTextInputRect; add test cases for SDL_SetTextInputRect to keyboard suite 2013-01-11 20:36:39 -08:00
Gabriel Jacobo
678523ea7c Android: Access APK files using AssetFileDescriptor 2013-01-08 09:30:53 -03:00