Commit Graph

59 Commits

Author SHA1 Message Date
Sam Lantinga
0a48abc860 Switch header convention from #include "SDL.h" to #include <SDL3/SDLh>
I ran this script in the include directory:
```sh
sed -i '' -e 's,#include "\(SDL.*\)",#include <SDL3/\1>,' *.h
```

I ran this script in the src directory:
```sh
for i in ../include/SDL3/SDL*.h
do hdr=$(basename $i)
   if [ x"$(echo $hdr | egrep 'SDL_main|SDL_name|SDL_test|SDL_syswm|SDL_opengl|SDL_egl|SDL_vulkan')" != x ]; then
        find . -type f -exec sed -i '' -e 's,#include "\('$hdr'\)",#include <SDL3/\1>,' {} \;
    else
        find . -type f -exec sed -i '' -e '/#include "'$hdr'"/d' {} \;
    fi
done
```

Fixes https://github.com/libsdl-org/SDL/issues/6575
2022-11-26 22:15:18 -08:00
Sam Lantinga
63f307fe1f Remove SDL_config.h from the public headers
The SDL headers are no longer dependent on the build configuration.

Fixes https://github.com/libsdl-org/SDL/issues/6643 and https://github.com/libsdl-org/SDL/issues/6641
2022-11-26 04:48:36 -08:00
Sam Lantinga
a635a485bc Re-added WinRT support until we're sure that it's no longer being used 2022-11-23 10:41:43 -08:00
Ozkan Sezer
dc2a3e06e9 removed WinRT support. 2022-11-22 23:36:24 +03:00
Sam Lantinga
2c4159b99a First pass at changing SDL 2.0 to SDL 3.0 2022-11-21 20:28:58 -08:00
Sam Lantinga
1b0277da61 Move SDL_mslibc.c into the source file list 2022-11-13 11:09:38 -08:00
许兴逸
c360ca9928 Add UWP-ARM64 Support. 2022-10-29 09:43:26 -07:00
Ozkan Sezer
e69838e745 add SDL_crc16.c to msvc and watcom builds 2022-08-11 20:11:32 +03:00
Anonymous Maarten
5da85376b9 stdlib: move all mslibc functions to SDL_mslibc.c
This allows disabling LTO on them by only specifying a single file.
2022-07-27 09:07:56 -07:00
Sam Lantinga
b299cb3d3c Added a utility function to calculate the next power of 2 for a value 2022-07-17 08:31:16 -07:00
Cameron Cawley
78089e6598 Remove unused internal header SDL_sysevents.h 2022-07-01 07:39:48 -07:00
Anonymous Maarten
ae7446a959 stlib: Extract SDL_memcpy and SDL_memset to its own file respectively
This is done such that we can disable LTO for these 2 functions when
building with MSVC.

This is due to a limitation of Link Time Code Generation (LTCG).
Code generation might generate a new reference to memset after linking
has started. The LTCG must make assumptions about where memset is
defined which is normally the C runtime.
2022-06-15 14:17:35 -07:00
Christoph Reichenbach
3a20274ddf Refactoring: move GUID operations out of Joystick
- SDL_JoystickGUID -> SDL_GUID (though we retain a type alias)
- Operations for GUID <-> String ops are now in
  src/SDL_guid.c and include/SDL_guid.h
- The corresponding Joystick operations delegate to SDL_guid.c
- Added test/testguid.c
2022-06-04 17:22:13 -07:00
Sam Lantinga
17410887d0 Separated controller type data into a C file 2022-06-03 15:03:08 -07:00
Sam Lantinga
d5e58049ae Don't specify a specific SDK when building for UWP
Instead use the latest version installed
2022-05-22 10:51:51 -07:00
Sam Lantinga
a0cdc1fc30 Added declaration of SDL_LogInit() and SDL_LogQuit()
Fixes compile warning on Android
2022-04-28 15:01:34 -07:00
Ethan Lee
b1831715a2
UWP: Require Windows 10 16299 or newer.
This is required to build with WGI support. Thanks for @FrozenChameleon for the fix!

Fixes #5504
2022-04-11 12:09:40 -04:00
Sylvain
ad6bc521bd
Move SDL_List functions to SDL_list.c to avoid more merge with eventual PR 2022-04-01 07:59:16 +02:00
Sam Lantinga
110e4e1334 Use WGI instead of XInput for Windows 10 UWP apps
Fixes https://github.com/libsdl-org/SDL/issues/5017
2021-11-27 10:24:32 -08:00
Sam Lantinga
11a9cd6344 Fixed building SDL on UWP 2021-11-27 08:14:50 -08:00
Sam Lantinga
5b646cd19e Build hidapi code into SDL as a new public API
This prevents conflicts with hidapi linked with applications, as well as allowing applications to make use of HIDAPI on Android and other platforms that might not normally have an implementation available.
2021-11-07 23:00:59 -08:00
Ethan Lee
3ed8ba7d33 winrt: Update SDL-UWP to VS2019 2021-09-08 06:26:26 -10:00
Ethan Lee
b88077fe5a winrt: Move the UWP project files up one directory 2021-09-08 06:26:26 -10:00
Ethan Lee
2facf5b7b7 winrt: Remove Windows 8.x project files 2021-09-08 06:26:26 -10:00
Ethan Lee
07b59df264 winrt: Remove unused nuspec/targets files 2021-09-08 06:26:26 -10:00
Sylvain
a2cd4255c9 Update VisualC projects 2021-08-19 00:10:59 +02:00
Joel Linn
8fc0baad98 Add SDL_cond implementation using Windows Condition Variables
Is automatically used when the SRW SDL_mutex implementation is active.
Otherwise falls back to the generic implementation.

v2: - Rebase onto master fa3ea1051a4b
2020-12-28 11:43:11 -08:00
Joel Linn
2443e51e0e Add optional suffix _generic to generic SDL_cond impl
Allows for runtime selectable implementation
2020-12-28 11:42:49 -08:00
Joel Linn
5b64fdc9bf thread/windows: Remove synchronization.lib from WinPhone81 dependencies
synch APIs are implicitly available on this platform.
2020-12-25 10:41:20 +03:00
Joel Linn
d6afc1c608 thread/windows: Statically link synchronization APIs on WINRT
GetModuleHandleW is not available on those platforms
---
 .../WinPhone81_VS2013/SDL-WinPhone81.vcxproj         |  8 ++++----
 VisualC-WinRT/WinRT81_VS2013/SDL-WinRT81.vcxproj     | 12 ++++++------
 src/thread/windows/SDL_sysmutex.c                    | 12 ++++++++++++
 src/thread/windows/SDL_syssem.c                      | 11 +++++++++++
 4 files changed, 33 insertions(+), 10 deletions(-)
2020-12-25 04:00:20 +03:00
Ozkan Sezer
250a055727 fix bug #5384 -- define DLL_EXPORT in DLL builds and adjust begin_code.h 2020-12-09 12:01:10 +03:00
Sam Lantinga
0150455d2c Added SDL_crc32.c to the Windows RT projects 2020-11-16 17:42:04 -08:00
Ryan C. Gordon
4627426994 url: WinRT actually works now (and has been tested, hooray!). 2020-10-06 00:42:17 -04:00
Ryan C. Gordon
6c6d2bdd35 url: Build WinRT-specific code as C++/CX instead of plain C++. 2020-10-05 16:25:48 -04:00
Ryan C. Gordon
57e3003d3f url: Attempt at WinRT support. 2020-10-05 15:47:47 -04:00
Ryan C. Gordon
b7b2995fbe url: Added to Visual Studio project files. 2020-10-05 15:27:32 -04:00
Sam Lantinga
4d15b5b893 Fixed building with Visual Studio 2019 2020-06-10 09:36:10 -07:00
Ryan C. Gordon
fa23e3d00b locale: Implemented SDL_GetPreferredLocales().
This was something I proposed a long time ago, Sylvain Becker did
additional work on it, then back to me.

Fixes Bugzilla #2131.
2020-05-04 02:27:29 -04:00
David Ludwig
40625c4e79 virtual joysticks: MSVC support part 2/2, add file refs to MSVC projects (bug 5028) 2020-03-15 16:01:19 -04:00
Ozkan Sezer
eb8f14bb6a added SDL_strtokr() as a replacement for POSIX strtok_r (bug #4046.) 2019-11-20 20:40:50 +03:00
Sam Lantinga
de5367a612 Added display event files to the Visual Studio projects 2018-08-23 02:48:47 -07:00
Sam Lantinga
b8ae2c1860 Fixed UWP build 2018-08-21 20:20:54 -07:00
Sam Lantinga
7749ee2a43 Added the dummy sensor driver to the Visual Studio projects 2018-08-21 13:42:44 -07:00
Sam Lantinga
2fc71d879d Windows Phone 8.0 is no longer supported 2018-02-09 08:03:03 -08:00
Ryan C. Gordon
6d32ebdbc9 winrt: Add mmdevapi.lib dependency to WinRT8.1 builds, for WASAPI support. 2017-12-31 03:51:17 -05:00
Ryan C. Gordon
351d6d4784 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
2017-12-06 12:24:32 -05:00
Sam Lantinga
a6a4e27ae8 Updated SDL's YUV support, many thanks to Adrien Descamps
New functions get and set the YUV colorspace conversion mode:
	SDL_SetYUVConversionMode()
	SDL_GetYUVConversionMode()
	SDL_GetYUVConversionModeForResolution()

SDL_ConvertPixels() converts between all supported RGB and YUV formats, with SSE acceleration for converting from planar YUV formats (YV12, NV12, etc) to common RGB/RGBA formats.

Added a new test program, testyuv, to verify correctness and speed of YUV conversion functionality.
2017-11-12 22:51:12 -08:00
Sam Lantinga
adc64f922f Added Visual Studio solution files for WinRT projects 2017-10-21 22:26:24 -07:00
Sam Lantinga
b5f31c392d Moved haptic source files into the proper folder 2017-08-30 09:44:38 -07:00
David Ludwig
e07e446a3f WinRT: removed Windows 8.0 from build-bot + NuGet package creation scripts
According to Steam's OS stats, Windows 8.0 use is pretty much nil.  Further,
Microsoft hasn't support Windows 8.0 development in any of their
actively-updated toolchains, and setting it up can be a pain.

In theory, SDL2 still supports Windows 8.0, however building of Windows 8.0
.dlls is no longer the default, if and when using the 'winrtbuild.*' scripts.
The MSVC 2012 project files for building Windows 8.0 dlls remain, though,
for the time being.
2017-02-25 21:23:12 -05:00