Commit graph

60 commits

Author SHA1 Message Date
Ozkan Sezer
79725cdb32 added SDL_strtokr() as a replacement for POSIX strtok_r (bug #4046.) 2019-11-20 20:40:50 +03:00
Ozkan Sezer
1bd9e1d4dc endpointvolume.h checks not needed since changeset 13078:ae4f9911321a . 2019-10-01 14:00:02 +03:00
Sam Lantinga
af32a2f4cd Updated copyright for 2019 2019-01-04 22:01:14 -08:00
Ozkan Sezer
c85ef4d8f9 configury, cmake: add check for endpointvolume.h :
add HAVE_ENDPOINTVOLUME_H, HAVE_MMDEVICEAPI_H and HAVE_AUDIOCLIENT_H
in SDL_config.h.in, SDL_config.h.cmake, SDL_config_windows.h, and in
SDL_config_winrt.h.
2018-09-28 13:41:04 +03:00
Sam Lantinga
2ca16d7410 Added a dummy sensor driver 2018-08-21 13:29:21 -07:00
Sam Lantinga
45352c8e76 Re-enabled the HIDAPI joystick driver on Windows and Mac OS X 2018-08-09 22:53:43 -07:00
Sam Lantinga
2b7a44c3e2 SDL: disable HIDAPI in SDL on Windows/Mac. 2018-08-09 16:03:55 -07: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
Ethan Lee
8551a596fa SDL_log10 2018-01-17 11:53:09 -05:00
Sam Lantinga
346af016a5 Updated copyright for 2018 2018-01-03 10:03:25 -08:00
Ryan C. Gordon
1745441419 audio: Port WASAPI to WinRT, remove XAudio2 backend.
XAudio2 doesn't have capture support, so WASAPI was to replace it; the holdout
was WinRT, which still needed it as its primary audio target until the WASAPI
code code be made to work.

The support matrix now looks like:

WinXP: directsound by default, winmm as a fallback for buggy drivers.
Vista+: WASAPI (directsound and winmm as fallbacks for debugging).
WinRT: WASAPI

--HG--
extra : amend_source : a28a9a9fbb09c4c25df05fa0a754fce0bee62335
extra : histedit_source : e5727ceb1a5db5806ce02534d8ffe4892eb6f5d9
2017-12-06 12:24:32 -05:00
Sam Lantinga
7190c9d143 Fixed compiling on Windows with HAVE_LIBC enabled 2017-11-04 18:01:03 -07:00
Sam Lantinga
4e9aab5884 Added SDL_fmod() and SDL_fmodf() 2017-11-04 17:35:03 -07:00
Sam Lantinga
b19c785d6e Fixed bug 3811 - change HAVE_COPYSIGN to HAVE__COPYSIGN in SDL_config_windows.h
Ozkan Sezer

The patch below changes HAVE_COPYSIGN macro in SDL_config_windows.h to
HAVE__COPYSIGN, so that _copysign() can be used in SDL_stdlib.h which
is available in many more windows-targeting toolchains such as MinGW,
MSVC >= 6, etc, and not just  MSVC >= 2013. SDL_stdlib.c already has a
specific check for HAVE__COPYSIGN, so I believe this is reasonable.
2017-09-10 10:30:25 -07:00
Sam Lantinga
014bb323c8 Correction: copysign has been supported by windows several toolchains
for a very long time, including MSVC6, MinGW, LCC-Win32, (no released
watcom versions though, but that's of no concern.)

Patch from Ozkan Sezer
2017-09-10 09:19:10 -07:00
Sam Lantinga
73a2b9ace8 Fixed bug 3760 - RWops doesn't check for integer overflow when stdio_fseek only supports 32 bits
Simon Hug

When RWops seeks with fseek or fseeko it uses the types long or off_t which can be 32 bits on some platforms. stdio_seek does not check if the 64-bit integer for the offset fits into a 32-bit integer. Offsets equal or larger than 2 GiB will have implementation-defined behavior and failure states would be very confusing to debug.

The attached patch adds range checking by using the macros from limits.h for long type and some bit shifting for off_t because POSIX couldn't be bothered to specify min and max macros.

It also defines HAVE_FSEEKI64 in SDL_config_windows.h so that the Windows function gets picked up automatically with the default config.

And there's an additional error message for when ftell fails.
2017-09-09 08:36:37 -07:00
Sam Lantinga
7a208f2d77 Fixed bug 3797 - configure check for float.h
Ozkan Sezer

Cmake checks for float.h, but configure does not:  the attached patch
adds float.h to checked headers in configury, and it adds the missing
HAVE_FLOAT_H macro to SDL_config.h.cmake and SDL_config.h.in.

In SDL_config_macosx.h and SDL_config_windows.h, defined HAVE_FLOAT_H
as 1, where I know that it's true.
2017-09-06 01:14:23 -07:00
Sam Lantinga
15cb6b4932 Be clear that disabling Vulkan surface support disables the entire SDL Vulkan integration 2017-08-28 00:11:38 -07:00
Ryan C. Gordon
a566435db1 vulkan: Initial Vulkan support!
This work was done by Jacob Lifshay and Mark Callow; I'm just merging it
into revision control.

--HG--
extra : rebase_source : cb3bb332146125366b5242c0d7444f44638733d9
extra : amend_source : c72ebb6d3a92efc3fdd085ce3b6d4b1d7f573cc9
2017-08-27 22:15:57 -04:00
Sam Lantinga
e9ee7f6f0d Fixed building SDL applications with Visual Studio and the clang toolset
Also fixed building 64-bit SDL with clang. 32-bit doesn't build because of the inline assembly for C runtime support.
2017-08-19 03:07:44 -07:00
Sam Lantinga
c1277f268e Updated config headers to override the base SDL_config.h if both are included 2017-02-20 10:55:33 -08:00
Ryan C. Gordon
d862693a74 wasapi: Initial WASAPI support, for Windows Vista and later.
This should remain binary compatible with Windows XP, as we dynamically
load anything we need and fall back to DirectSound/WinMM/XAudio2 if not
available.
2017-02-14 03:03:27 -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
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
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
9cdeec59f3 Split the XInput and DirectInput code so Windows RT can use the existing XInput support.
--HG--
rename : src/audio/directsound/directx.h => src/core/windows/SDL_directx.h
rename : src/haptic/windows/SDL_syshaptic.c => src/haptic/windows/SDL_windowshaptic.c
rename : src/haptic/windows/SDL_syshaptic_c.h => src/haptic/windows/SDL_windowshaptic_c.h
rename : src/joystick/windows/SDL_dxjoystick.c => src/joystick/windows/SDL_dinputjoystick.c
rename : src/joystick/windows/SDL_dxjoystick_c.h => src/joystick/windows/SDL_dinputjoystick_c.h
rename : src/joystick/windows/SDL_dxjoystick_c.h => src/joystick/windows/SDL_windowsjoystick_c.h
2014-07-03 15:39:55 -07:00
Sam Lantinga
276b7efecd Added SDL_sqrtf(), SDL_tan(), SDL_tanf() 2014-06-07 18:20:01 -07:00
Ryan C. Gordon
a8ab12a0d6 Fix build on Windows targets without dxgi.h, like MingW32. 2014-05-06 00:13:07 -04:00
Sam Lantinga
6feafcef7c Temporarily disabled the D3D11 renderer so we can get a build. 2014-03-10 19:11:50 -07:00
Sam Lantinga
1348631206 Converted David Ludwig's D3D11 renderer to C and optimized it.
The D3D11 renderer is now slightly faster than D3D9 on my Windows 8 machine (testsprite2 runs at 3400 FPS vs 3100 FPS)
This will need tweaking to fix the Windows RT build.

--HG--
rename : src/render/direct3d11/SDL_render_d3d11.cpp => src/render/direct3d11/SDL_render_d3d11.c
2014-03-10 01:51:03 -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
Ryan C. Gordon
3003efb88d Added SDL_vsscanf().
--HG--
extra : rebase_source : 088d093790a7ed95d73c307523587e95c8356f4b
2013-11-24 23:35:38 -05:00
Ryan C. Gordon
924207a299 Hook up SDL_acos and SDL_asin properly. 2013-12-09 15:17:20 -05:00
Gabriel Jacobo
f21d3e7e2a OpenGL ES support for Windows 2013-11-22 13:24:53 -03:00
Sam Lantinga
be18d2d007 Fixed function feature test for Visual Studio 2012
norfanin

Fixes the version check for some functions that are only present with the MSVC 2013 CRT libraries.

I did my testing wrong and failed to see that 2012 doesn't have these functions. Microsoft implemented them in their upcoming 2013 version, though. The attached patch changes it to the check for the next version.

I also removed the HAVE_ITOA because that would require linking with oldnames.lib and it's easier to just let the SDL implementation take over.
2013-10-13 19:51:58 -07:00
Sam Lantinga
edf503e870 Fixed bug 1820 - building SDL as a static library with static runtime doesn't compile/link with visual studio
norfanin

Adds a condition so only the MSVC 2012 compiler defines the macros for the functions of its version.

Attaching a patch that adds a condition so that the HAVE_X supported by MSVC 2012 only get defined with that compiler. MSVC 2008 and 2010 will then build without any modification to the SDL source code.

Also moved HAVE_M_PI to a separate check. The Microsoft headers require _USE_MATH_DEFINES to be defined before they define the constants.

--HG--
extra : rebase_source : 5a348adc971f36b3e524a3f30759c6b4c04c400d
2013-09-28 10:30:51 -07:00
Ryan C. Gordon
2b9a2802b2 Added SDL_GetBasePath() and SDL_GetPrefPath() in new filesystem module.
--HG--
extra : rebase_source : c1fac232063443a2880e64f1abda85e0bdb2e710
2013-08-20 19:57:11 -04:00
Sam Lantinga
d944115cb1 Added a comment to say why C runtime is off by default 2013-05-26 16:08:15 -07:00
Sam Lantinga
b3d555764f Don't use the C runtime library on Windows, to avoid C runtime dependencies and manifest issues. 2013-05-26 15:50:20 -07:00
Sam Lantinga
6ff3478440 Don't assume the XAudio2 APIs will never be available 2013-05-26 11:39:19 -07:00
Sam Lantinga
0cb6385637 File style cleanup for the SDL 2.0 release 2013-05-18 14:17:52 -07:00
Sam Lantinga
95dcfa4c28 Happy New Year! 2013-02-15 08:47:44 -08:00
Sam Lantinga
062602b52b The latest version of MinGW-w64 has the necessary headers and libraries: http://mingw-w64.sourceforge.net/ 2012-12-22 11:23:18 -08:00
Sam Lantinga
423c05313b Make it possible to build a DLL with mingw that's ABI compatible with Visual C++ built applications 2012-10-20 00:14:58 -07:00
Ryan C. Gordon
5c732d6324 Removed Windows CE support from SDL 2.0.
It's a long-dead platform, and we don't have any way to build for, test, or
maintain it, so there's no sense in doing acrobatics to support it.

If you need Windows CE support, use SDL 1.2. If you need Windows Phone support,
send SDL 2.0 patches for the newer Windows Mobile platform.
2012-09-15 10:59:39 -04:00
Sam Lantinga
028e5dcdbd Happy New Year! 2011-12-31 09:28:07 -05:00