Commit graph

140 commits

Author SHA1 Message Date
Sam Lantinga
6b6170caf6 Updated copyright date for 2020 2020-01-16 20:49:25 -08:00
Sam Lantinga
7b8e308a67 Improved XInput VID/PID detection and added SDL_wcsstr() and SDL_wcsncmp() 2019-11-20 16:42:50 -08:00
Ozkan Sezer
79725cdb32 added SDL_strtokr() as a replacement for POSIX strtok_r (bug #4046.) 2019-11-20 20:40:50 +03:00
Ryan C. Gordon
cf6b9e8180 stdinc: On macOS and iOS, use memset_pattern4() for SDL_memset4().
Fixes Bugzilla #4724.

--HG--
extra : rebase_source : 09a73f9539ef4b5086c68dcbd42be5944b551fa8
2019-09-04 00:39:47 -04:00
Ozkan Sezer
ab8f831379 Fix bug 4746 - introduce SDL_zeroa macro. 2019-07-31 01:22:02 +03:00
Sam Lantinga
af32a2f4cd Updated copyright for 2019 2019-01-04 22:01:14 -08:00
Sam Lantinga
db39b4811f Added HIDAPI joystick drivers for more consistent support for Xbox, PS4 and Nintendo Switch Pro controller support across platforms.
Added SDL_GameControllerRumble() and SDL_JoystickRumble() for simple force feedback outside of the SDL haptics API
2018-08-09 16:00:17 -07:00
Ethan Lee
54ce812205 SDL_exp 2018-08-04 11:52:46 -04:00
Ozkan Sezer
7a1c60fed4 SDL_stdinc.h: move the alloca() includes before begin_code.h 2018-05-10 08:28:00 +03:00
sezero
5f0540416f add SDL_log10 and SDL_log10f to include and dynapi 2018-02-08 17:07:47 +03:00
Sam Lantinga
346af016a5 Updated copyright for 2018 2018-01-03 10:03:25 -08:00
Sam Lantinga
4e9aab5884 Added SDL_fmod() and SDL_fmodf() 2017-11-04 17:35:03 -07:00
Sam Lantinga
554d129015 Added float versions of SDL's math functions 2017-11-04 15:34:14 -07:00
Sam Lantinga
fc917367af Added min/max macros for the sized SDL datatypes 2017-10-16 14:39:56 -07:00
Sam Lantinga
c750316a19 Fixed compiler warning 2017-10-12 17:17:09 -07:00
Sam Lantinga
4d7a2db434 Added functions to query and set the SDL memory allocation functions:
SDL_GetMemoryFunctions()
    SDL_SetMemoryFunctions()
    SDL_GetNumAllocations()
2017-10-12 13:44:28 -07:00
Sam Lantinga
1dd1b3ff9c Fixed bug 3780 - GCC 7 implicit fallthrough warnings
Martin Gerhardy 2017-08-28 06:58:01 UTC

SDL_blit.h, SDL_fillrect.c and SDL_stdinc.h produces a lot of the (new) gcc-7 implicit fallthrough warnings.
2017-09-06 04:32:30 -07:00
Sam Lantinga
b426a9b28b Added wchar.h to fix build on some platforms with new wcs* functions 2017-08-13 22:26:44 -07:00
Sam Lantinga
bb037eaa61 Added SDL_wcscmp() 2017-08-13 20:37:49 -07:00
Ryan C. Gordon
cde75a408d Make compile-time assert error messages more clear.
Now the compiler might say this:

'SDL_compile_time_assert_mytest' declared as an array with a negative size

instead of

'SDL_dummy_mytest' declared as an array with a negative size

--HG--
extra : rebase_source : 3f7355099cc59118ed4aa39c4a9935f2bf17698f
2017-06-10 15:38:14 -04:00
Philipp Wiesemann
3e556aa92e Fixed comments in headers for doxygen output. 2017-06-04 23:15:39 +02:00
Ryan C. Gordon
d202066528 stdlib: added SDL_utf8strlen().
--HG--
extra : histedit_source : 3ef78f0c18ad1f096882e5e079119fe0b3fef6db%2Cd98e52df919c701f80b47d989028227d060e2ecb
2017-05-29 03:01:05 -04:00
Ryan C. Gordon
82d0a04881 Fix some more compiler warnings on armcc. 2017-03-03 16:38:17 -05:00
Sam Lantinga
1b24bfad38 Updated copyright for 2017 2017-01-01 18:33:28 -08:00
Sam Lantinga
91e0a1d094 Renaming of guard header names to quiet -Wreserved-id-macro
Patch contributed by Sylvain
2016-11-20 21:34:54 -08:00
Sam Lantinga
d53007ae0e Fixed bug 2885 - SDL_stdinc.h doesn't need to include iconv.h
Ryan C. Gordon

We still include iconv.h in SDL_stdinc.h, probably because this header might have referenced the native iconv functions and types directly. Since these are hidden behind a stable ABI now and never just a #define for the system iconv, we shouldn't need this header included from a public SDL header anymore, slowing down external apps compiles and pulling tons of stuff into the namespace.
2016-10-07 16:44:42 -07:00
Sam Lantinga
b26da9ce71 Fixed bug 3336 - Failure to build with MinGW-w64
Kai Sterker
There are already patches available from mingw64 that fix the issue

https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-SDL2

With those applied, I could compile SDL2 without problems. But of course, it would be preferable if SDL built cleanly from source.
2016-10-01 10:28:00 -07:00
Sam Lantinga
7ee8dda270 Updated copyright to 2016 2016-01-02 10:10:34 -08:00
Sam Lantinga
56b58afdbe Updated the copyright year to 2015 2015-05-26 06:27:46 -07:00
Ryan C. Gordon
14d69c7f05 Make SDL_stdinc.h work when compiling with -Wundef (thanks, Ben!).
Fixes Bugzilla #2664.
2015-04-08 01:42:47 -04:00
Ryan C. Gordon
12d065e7e1 Fixed SDL_PRI?64 for 64-bit Linux.
64-bit Linux uses a "long" instead of "long long" for 64-bit ints.

Added a special-case this so SDL_PRI?64 doesn't trigger compiler warnings
when used with SDL's 64-bit datatypes on 64-bit Linux.

--HG--
extra : rebase_source : 573ae86baa2648ab2b84479f2d8058e2c6dec009
2015-03-02 21:36:45 -05:00
Ryan C. Gordon
db239776a8 Clang static analysis builds should use C runtime directly.
This is a little macro magic to use malloc() directly instead of SDL_malloc(),
 etc, so static analysis tests that know about the C runtime can function
 properly, and understand that we are dealing with heap allocations, etc.

This changed our static analysis report from 5 outstanding bugs to 30.

5x as many bugs were hidden by SDL_malloc() not being recognized as malloc()
 by the static analyzer!
2015-01-05 01:41:42 -05:00
Edward Rudd
5f2e37555d ugh.. stray character 2014-12-03 12:47:39 -05:00
Edward Rudd
8ddea9cb66 fix SDL_PRIs64 on windows compilers.. (should end in d) 2014-12-03 12:45:04 -05:00
Edward Rudd
f39c6e8a6f switch to use SDL_PRI* macros for long long formatting everywhere. 2014-12-03 12:23:17 -05:00
Sam Lantinga
b3e4782510 Removed SDL_round() because the license wasn't compatible with zlib 2014-08-17 13:11:55 -07:00
Sam Lantinga
5acb7c63d1 Added SDL_round(), contributed by Benoit Pierre - thanks! 2014-08-16 23:23:15 -07:00
Sam Lantinga
29eae011c5 Don't redefine standard macros, use SDL specific macros instead to avoid compiler warnings 2014-06-23 11:06:50 -07:00
Sam Lantinga
9e25cdad8c commit 9e211e646f9d51dc1372c9f3c8f47a78caf4f2a5
Author: Sam Clegg <sbc@chromium.org>
Date:   Fri Jun 20 12:52:11 2014

    Fix win32 build which was failing due to missing PRIs64.

    This change adds definitions for the C99 PRIs16 and PRIu64
    which are missing from <stdint.h> on at last win32 and
    possibly other platforms.

    These already existed in testgesture.c so I removed them
    from there also.
2014-06-21 11:24:06 -07:00
Philipp Wiesemann
d09a0ff3a6 Fixed typo in source comment. 2014-06-08 12:51:02 +02:00
Sam Lantinga
276b7efecd Added SDL_sqrtf(), SDL_tan(), SDL_tanf() 2014-06-07 18:20:01 -07:00
Sam Lantinga
53d9d2c232 Added annotations to help code analysis tools
CR: Bruce Dawson
2014-06-04 10:56:56 -07:00
Sam Lantinga
a7d2ebb8d6 Integrated David Ludwig's support for Windows RT 2014-03-09 11:36:47 -07:00
Sam Lantinga
d7940a513e Fixed bug 2374 - Update copyright for 2014...
Is it that time already??
2014-02-02 00:53:27 -08:00
David Ludwig
ebfac58560 WinRT: merged with latest SDL 2.x/HG code
SDL 2.x recently accepted patches to enable OpenGL ES 2 support via Google's ANGLE library.  The thought is to try to eventually merge SDL/WinRT's OpenGL code with SDL-official's.
2013-11-28 22:09:21 -05:00
Ryan C. Gordon
3003efb88d Added SDL_vsscanf().
--HG--
extra : rebase_source : 088d093790a7ed95d73c307523587e95c8356f4b
2013-11-24 23:35:38 -05:00
Sam Lantinga
e29d5bd5db Fixed bug 2245 - add SDL_acos and SDL_asin
Sylvain

Here's some code to add arc cosine, and arc sin functions to SDL_stdlib.c
There are plainly written using SDL_atan.

--HG--
extra : rebase_source : 3c92b648c11366af38fac18df85eb7d5da6fe292
2013-11-16 18:56:02 -08:00
Sam Lantinga
0606843ed8 Clarified that SDL_memset4 is a 32-bit assignment and fixed a compiler warning 2013-11-03 09:42:23 -08:00
David Ludwig
59df93166d WinRT: merged with SDL 2.0.1 codebase 2013-10-27 21:26:46 -04:00
David Ludwig
76880e2b8b WinRT: more "Windows RT" to "WinRT" renaming 2013-08-27 12:20:35 -04:00