Commit graph

207 commits

Author SHA1 Message Date
Ryan C. Gordon
f4b87c2bcb vulkan: Include a copy of vulkan.h and vk_platform.h.
Now we can provide Vulkan support in the build even if the build box doesn't
have a Vulkan SDK, since we dynamically link to the library anyhow.

--HG--
extra : rebase_source : f4972489a15b276f65ea65c077172fdcbbe3420a
2017-08-27 23:25:12 -04: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
1e2f295236 Fixed bug 3761 - Windows non-MinGW cmake build defines HAVE_WCSLCPY and HAVE_WCSLCAT
Tom Seddon

0f0ad62237 (git head at the time of writing); Visual Studio 2015, toolset v140, Platform 10.0.14393.0, building for x64

Windows non-MinGW cmake build sets defines implying wcslcpy and wcslcat are available, but Windows doesn't have these functions.

Ryan C. Gordon

That's weird, these are the exact two functions that Emscripten incorrectly believed it had until we upgraded the buildbot's emsdk install.

Not sure what's up with this, but it's possibly not a MingW-specific thing!
2017-08-21 11:25:04 -07:00
Sam Lantinga
a6c8a8694e configury: check mmdeviceapi.h and audioclient.h before enabling wasapi. 2017-08-21 11:17:38 -07:00
Sam Lantinga
d345de0831 Updated version to 2.0.6 2017-08-18 18:16:37 -07:00
Sam Lantinga
d5c138b4f0 Added WASAPI audio target to autoconf build process 2017-08-18 17:29:44 -07:00
Ryan C. Gordon
4fa703ae18 configure: Apple platforms don't need to build with -fpascal-strings anymore. 2017-08-18 19:53:40 -04:00
Ryan C. Gordon
950bb27c66 configure: mac and iOS should compile core/unix/*.c
macOS currently needs this if you build with X11 support. iOS doesn't
(currently), but it doesn't hurt to compile it in case we do something
Unixy on that platform later on.
2017-08-18 19:52:58 -04:00
Sam Lantinga
87ea96c003 Fixed bug 2330 - Debian bug report: SDL2 X11 driver buffer overflow with large X11 file descriptor
manuel.montezelo

Original bug report (note that it was against 2.0.0, it might have been fixed in between):  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=733015

--------------------------------------------------------
Package: libsdl2-2.0-0
Version: 2.0.0+dfsg1-3
Severity: normal
Tags: patch

I have occasional crashes here caused by the X11 backend of SDL2. It seems to
be caused by the X11_Pending function trying to add a high number (> 1024)
file descriptor to a fd_set before doing a select on it to avoid busy waiting
on X11 events. This causes a buffer overflow because the file descriptor is
larger (or equal) than the limit FD_SETSIZE.

Attached is a possible workaround patch.

Please also keep in mind that fd_set are also used in following files which
may have similar problems.

src/audio/bsd/SDL_bsdaudio.c
src/audio/paudio/SDL_paudio.c
src/audio/qsa/SDL_qsa_audio.c
src/audio/sun/SDL_sunaudio.c
src/joystick/linux/SDL_sysjoystick.c


--------------------------------------------------------

On Tuesday 24 December 2013 00:43:13 Sven Eckelmann wrote:
> I have occasional crashes here caused by the X11 backend of SDL2. It seems
> to be caused by the X11_Pending function trying to add a high number (>
> 1024) file descriptor to a fd_set before doing a select on it to avoid busy
> waiting on X11 events. This causes a buffer overflow because the file
> descriptor is larger (or equal) than the limit FD_SETSIZE.


I personally experienced this problem while hacking on the python bindings
package for SDL2 [1] (while doing make runtest). But it easier to reproduce in
a smaller, synthetic testcase.
2017-08-14 20:22:19 -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
Sam Lantinga
507faa51f8 Fixed bug 2812 - Make libSDL2main.a usable on Android via a dummy symbol
Jonas Kulla

This eliminates the need to manually compile in SDL_main_android.c.
Instead, add "-lSDL2main -Wl,-u,SDL_main_dummy" when linking.

I don't know how the nkd-build process works, but unless it was
for some reason linking libSDL2main.a it should be unaffected.
2017-08-13 18:12:06 -07:00
Sam Lantinga
67bb802fe6 Fixed bug 3208 - Minor improvements to the configure script
Rafal Muzylo

"if we're already using libtool, why aren't we using it ?"; they've been inspired by the fact, that at that mark, neither libSDL2_test.a nor libSDL2main.a were being built correctly (not sure if it's fully broken or just because I've tested the out-of-tree build)
2017-08-12 15:00:33 -07:00
Sam Lantinga
846a2035b2 Fixed bug 3292 - SDL_rwops and 64-bit file I/O
Juha Niemimä

On AmigaOS 4 platform with Newlib 'C' library, there is a problem with failing fseeko64. This seemed to be caused by using fopen instead of fopen64.
2017-08-11 21:16:33 -07:00
Ryan C. Gordon
156d7fc580 haiku: non-x86 spins use a normal libstdc++ filename. Handle the differences.
Fixes Bugzilla #3730.

--HG--
extra : rebase_source : e89755d5a83bb4c0a8c1456e3c58390d358742f9
2017-08-09 18:41:59 -04:00
Philipp Wiesemann
c10c85a21d Updated generated configure script. 2017-08-04 23:01:01 +02:00
Sam Lantinga
396a81c053 Fixed bug 3609 - Windows build fails due to conflicting types for 'XINPUT_GAMEPAD_EX'
Ozkan Sezer

(In reply to Ryan C. Gordon from comment #9)
> I've put this patch in as https://hg.libsdl.org/SDL/rev/117d4ce1390e ...can
> you verify this works on the latest MinGW?
>
> Thanks,
> --ryan.


This patch is wrong: the structure in question has nothing to do with any
gcc version in use.  I suggest reverting this adding a conigury check for
it, instead.  Something like the following should do it: (configure needs
regenerating.)
2017-07-10 18:31:28 -07:00
Philipp Wiesemann
62b378d322 Updated generated configure script. 2017-07-09 23:00:43 +02:00
Philipp Wiesemann
c49ef40ede directfb: Fixed configure script not finding shared objects for dynamic loading. 2017-06-11 22:30:06 +02:00
Ryan C. Gordon
0240079805 jack: Initial shot at a JACK audio target.
http://jackaudio.org/

Fixes Bugzilla #2163.
(with several more commits following to improve this code.)

--HG--
extra : rebase_source : 5d0d44fcca077c41c56381575a45184bdc050003
2017-06-08 13:27:58 -04:00
Ryan C. Gordon
55c65a1616 audio: rename bsd target to netbsd.
Apparently this is no longer a generic BSD audio target, and hasn't been for
years, so rename it for NetBSD.

--HG--
rename : src/audio/bsd/SDL_bsdaudio.c => src/audio/netbsd/SDL_netbsdaudio.c
rename : src/audio/bsd/SDL_bsdaudio.h => src/audio/netbsd/SDL_netbsdaudio.h
2017-05-24 19:56:59 -04:00
Ryan C. Gordon
98dc082ffa Fixed another AC_DEFINE. 2017-05-02 11:31:14 -04:00
Ryan C. Gordon
317fd5911e Fixed configure script.
The Haiku patch would define some HAVE_* things to /**/ instead of 1, breaking
the build for various things.
2017-05-02 11:16:58 -04:00
Ryan C. Gordon
2c4f84ff4c haiku: Various fixes from haikuports.
Based on patch here:

https://github.com/haikuports/haikuports/blob/master/media-libs/libsdl2/patches/libsdl2-2.0.5.patchset

--HG--
extra : amend_source : 7f91b3983b70eb00345e5706bf78c869c15f85aa
2017-05-01 18:39:05 -04:00
Philipp Wiesemann
ec668b9e23 Updated generated configure script. 2017-04-02 21:33:02 +02:00
Brandon Schaefer
86906a708a mistake: Revert the files that I did not mean to commit 2017-03-01 15:05:54 -08:00
Brandon Schaefer
b2e704d70c * Some refactoring and bug fixes. Thanks Michał Kuchta! 2017-03-01 14:50:59 -08:00
Ryan C. Gordon
dea6213bed Updated generated configure script. 2017-02-26 01:03:39 -05:00
Sam Lantinga
cc640593fa Updated iOS fat build 2017-02-20 10:55:49 -08:00
Ryan C. Gordon
088da5be10 configure: report libsamplerate support status. 2017-01-24 16:18:25 -05:00
Ryan C. Gordon
f521e5b213 configure.in: Check for sse3 too when setting -mfpmath=387. 2017-01-24 12:20:12 -05:00
Ryan C. Gordon
6e1edca849 audio: Wired up new SSE code to build system.
--HG--
extra : rebase_source : 3c94cdc92b94864eb43d7429032724227b798cf2
2017-01-23 01:05:44 -05:00
Sam Lantinga
9558d55a84 Implemented full evdev keyboard text support
This is based on the Linux kernel driver, and has fallback mapping tables in case we aren't connected to a virtual terminal.
2017-01-09 02:54:42 -08:00
Sam Lantinga
5f89fe73fa Fixed attempting to dynamically load libsamplerate when shared object loading is disabled.
Thanks to Ozkan Sezer for pointing this out
2017-01-08 10:52:02 -08:00
Sam Lantinga
5a0aef995a Added configure and cmake support for libsamplerate 2017-01-06 20:43:53 -08:00
Sam Lantinga
1e59d959f0 Avoid conflicts with multiple versions of udev by first trying the library that is linked with the executable, if any, and then picking the one that is in the build environment.
This fixes joystick detection for applications using the Steam Linux Runtime
2016-11-29 05:34:20 -08:00
Philipp Wiesemann
ede80bbcc1 Updated configure script. 2016-11-19 23:27:51 +01:00
Sam Lantinga
6fcf21b827 Standardized the format of the SDL joystick GUID and added functions to retrieve the USB VID/PID from a joystick and game controller. 2016-11-10 17:19:34 -08:00
Sam Lantinga
c7735b4175 Fixed bug with udev support reporting
Joshua Bodine

I'm going to reopen this because configure should still accurately report whether libudev will be used. Right now it just tests whether it's enabled as an argument, not whether configure was successful in finding it.
2016-11-01 10:42:35 -07:00
Sam Lantinga
f77ff66089 Fixed bug 3478 - Patch Haiku to use dlopen instead of load_add_on
Kai Sterker

SDL2 on Haiku so far uses Haiku-specific APIs for loading dynamic objects as add-ons, instead of using dlopen to load them as libraries. This, for example, leads to SDL_mixer not being able to load its audio backends, when compiled with standard settings.

As discussed at https://www.freelists.org/post/haikuports/SDL2-mixer-ogg-music-not-playing-and-other-stuff,2 , the best way to deal with this would be using dlopen instead of load_add_on. The following patch implements this change by dropping the Haiku-specific bits and using dlopen instead.
2016-11-01 10:30:46 -07:00
Sam Lantinga
de631d20e4 Fixed bug 2824 - Add Fcitx Input Method Support
Weitian Leung

Just moved ibus direct call to SDL_IME_* related functions, and adds fcitx IME support (uses DBus, too),
enable with env: SDL_IM_MODULE=fcitx (ibus still the default one)
2016-10-07 18:57:40 -07:00
Sam Lantinga
a43ff2f155 Fixed bug 3043 - fix alsa configury and cmake checks
Ozkan Sezer

SDL's alsa uses snd_pcm_recover() which has been available only since alsa-lib-1.0.11.
2016-10-07 18:03:08 -07:00
Sam Lantinga
79485875b5 Updated version to 2.0.5 in preparation for release 2016-09-28 22:24:01 -07:00
Philipp Wiesemann
bd1799c67f Updated configure script. 2016-09-26 23:09:34 +02:00
Sam Lantinga
8d2e2aad1d Fixed set of libraries needed to build on Mac OS X 2016-09-15 08:57:56 -07:00
Sam Lantinga
ed62fd26c8 Hopefully fixed the cmake build on Mac OS X 2016-09-15 08:46:14 -07:00
Sam Lantinga
1b61eae340 Fixed building new coreaudio driver on Mac OS X 2016-09-15 08:29:20 -07:00
Gabriel Jacobo
641bf4c2c8 Fixes building SDL on Ubuntu 16.04 with Mir headers installed 2016-09-01 16:01:54 -03:00
Sam Lantinga
aa51d46bdd wayland: Add support for relative mouse mode, by Jonas Ådahl <jadahl@gmail.com>
Generate the C protocol files from the protocol XML files installed by
wayland-protocols, and use them to implement support for relative pointer
motions and pointer locking.

Note that at the time, the protocol is unstable and may change in the future.
Any future breaking changes will, however, fail gracefully and result in no
regressions compared to before this patch.
2016-09-01 01:26:56 -07:00
Jonas Ådahl
44760bd0c7 wayland: Build own version of core protocol
Since we are loading shared objects dynamically, build our own version of the
core protocol symbols, so that we in the future can include protocol
extensions.
2016-06-23 18:39:05 +08:00