Commit graph

286 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
Anuj Mittal
61f5cf85e1 configure: check for build dir when building version res (fix bug #4858)
Fixes a race where we try to build version res file in build directory
before it has even been created. Prevents errors like:

/bin/bash ../SDL2-2.0.10/build-scripts/updaterev.sh
/bin/bash ../SDL2-2.0.10/build-scripts/mkinstalldirs build
mkdir -p -- build
x86_64-pokysdk-mingw32-windres --include-dir=/home/pokybuild/yocto-worker/meta-mingw/build/build/tmp/work/x86_64-nativesdk-mingw32-pokysdk-mingw32/nativesdk-libsdl2/2.0.10-r0/recipe-sysroot/opt/poky/3.0/sysroots/x86_64-pokysdk-mingw32/usr/include ../SDL2-2.0.10/src/main/windows/version.rc build/version.o
x86_64-pokysdk-mingw32-windres: build/version.o: No such file or directory
Makefile:692: recipe for target 'build/version.o' failed
make: *** [build/version.o] Error 1
make: *** Waiting for unfinished jobs....
touch build/.created
WARNING: exit code 1 from a shell command.

Extension of fix:
https://hg.libsdl.org/SDL/rev/99d8b18acf8a

Signed-off-by: Anuj Mittal <am.devel@gmail.com>
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
2019-11-13 10:51:02 +03:00
Ryan C. Gordon
bafcc3737f configure: Regenerate configure script with the ARM SIMD/NEON changes. 2019-10-24 21:51:55 -04:00
Ryan C. Gordon
06d5992f30 x11: On macOS, look for X11 install in /opt/X11 instead of /usr/X11R6.
This is where Apple installs XQuartz now (and apparently, the compatibility
symlink at /usr/X11R6 can be missing).

Fixes Bugzilla #4706.

--HG--
extra : histedit_source : 962212cab88ecd1230ec4f491505c88d67085b53
2019-10-15 22:36:08 -04:00
Ozkan Sezer
1bd9e1d4dc endpointvolume.h checks not needed since changeset 13078:ae4f9911321a . 2019-10-01 14:00:02 +03:00
Sam Lantinga
455a109d79 Updated SDL development builds to version 2.0.11 2019-09-22 10:37:16 -07:00
Sam Lantinga
dcf21d5da2 Disable HIDAPI by default, as it breaks on Linux when trying to use libusb with non-root permissions on some distributions 2019-08-12 13:35:36 -07:00
Sam Lantinga
97b93a86d6 Fixed bug 4354 - CMake builds do not correctly enable IME on Linux
Callum McGing

While the CMake build checks for ibus and does enable the ibus backend with set(HAVE_IBUS_IBUS_H TRUE), this does not define SDL_USE_IME, thus CMake built SDL2 (as in Arch Linux) cannot use IME at all.

The attached patch fixes this behaviour when building against ibus. IME support will still fail when only fcitx is available on the build system.
2019-08-05 23:46:09 -07:00
Ethan Lee
99abe1244f Port libusb hid.c to SDL, add to MinGW configure 2019-08-04 00:01:38 -04:00
Alex Szpakowski
0ba98cae5f Add public APIs for creating a Metal view attached to an SDL window. Add SDL_metal.h. 2019-08-05 12:35:32 -03:00
Sam Lantinga
1d2350c07f Fixed building on Mac OS X without libusb 2019-08-02 18:14:31 -07:00
Ozkan Sezer
c8e23236cd configury: allow libusb-less hidapi for macosx. 2019-08-01 17:41:40 +03:00
Ethan Lee
55c49e7d33 hidapi: Add SDL_hidapi.c, allows support for multiple hidapi backends.
This is currently supported on Linux and macOS. iOS and Android are not
supported at all, Windows support could be added with some changes to the libusb
backend. The Visual Studio and Xcode projects do not use this feature.

Based on Valve Software's hid.cpp, written in collaboration with Andrew Eikum.
2019-07-31 12:20:55 -04:00
Ryan C. Gordon
1f7b118b31 configure: Windows and macOS now respect --enable-hidapi.
(and it defaults to "yes" on those platforms. Other places, which use libusb,
still default to no because they probably need root permissions to work.)

--HG--
extra : rebase_source : a1e87bb21658338374c94701860e90eacd90c6ea
2019-07-08 16:08:16 -04:00
Sam Lantinga
af46b86d33 Enable Raspberry Pi video by default 2019-06-21 10:58:30 -07:00
Sam Lantinga
a288bb0eca Updated version to 2.0.10 2019-06-17 10:13:28 -07:00
Sam Lantinga
badd09dfb5 Temporary fix for bug 4254 - a _lot_ of strict aliasing warnings
Ozkan Sezer

A horde of strict aliasing violation warnings are emitted from joystick
layer, and also from a few other places. This happens with gcc-4.4.7 on
Linux CentOS 6.10.  Some other sysjoystick would possibly have the same
warnings.

Attached my full log here. Example entry:
src/joystick/SDL_joystick.c: In function 'SDL_GetJoystickGUIDInfo':
src/joystick/SDL_joystick.c:1094: warning: dereferencing pointer '({anonymous})' does break strict-aliasing rules
2019-06-08 18:32:29 -07:00
Sam Lantinga
646f7d2b3a Fixed bug 4655 - evdev is available on FreeBSD, check in 'configure' limited to Linux
Jan Martin Mikkelsen

The evdev interface is available on FreeBSD, with the xf86-input-evdev for include files in /usr/local/include/linux, so <linux/input.h> works, or when build with the native evdev option, where <dev/evdev/input.h> is available.
2019-06-05 12:03:45 -07:00
Sam Lantinga
0f77e6c119 Use _Exit() when available 2019-04-23 07:59:31 -07:00
Ryan C. Gordon
7057d3fa91 configure: Cleaned up audio/video summaries when building for Windows. 2019-04-21 21:34:14 -04:00
Sam Lantinga
0b8f778883 configure.in: Rename configure.ac to fix an 'aclocal' warning
--HG--
rename : test/configure.in => test/configure.ac
2019-04-02 05:31:08 -07:00
Sam Lantinga
6f8f79f648 Fixed configure error if pkg modules aren't available 2019-03-16 19:32:59 -07:00
Sam Lantinga
145857ab85 Added missing PKG_CONFIG macros 2019-03-16 17:39:15 -07:00
Ryan C. Gordon
26afcb485a events: Let arbitrary signals to simulate iOS/Android backgrounding events.
This lets you build a custom embedded device that roughly offers the "this
process is going to the background NOW" semantics of SDL on a mobile device.
2019-03-15 15:51:05 -04:00
Sam Lantinga
13bbc7e0b2 Fixed bug 4379 - fix parallel build with slibtool
orbea

I am having a parallel build problem with -j3 or higher using the autotools build and slibtool instead of GNU libtool. Basically slibtool is faster than GNU libtool and it will start working before mkdir starts or finishes creating the build/ directory.
2018-12-08 11:22:50 -08:00
Ryan C. Gordon
b6591a8ec7 egl: Don't force X11 support when testing for EGL.
Fixes building Wayland support on embedded systems without X11.

(TODO: maybe move the EGL test out of the X11 tests at some point, too.)

--HG--
extra : rebase_source : a70906fcb36821bd1578b5913de14cb5c35cb0d3
2018-12-05 16:53:15 -05:00
Ryan C. Gordon
2601ef1f2d linux: Move SDL_LinuxSetThreadPriority() elsewhere to fix build.
Fixes Bugzilla #4393.

--HG--
extra : rebase_source : 6f11be4047f8e92542f8d3d3938c76594e19cda0
2018-12-05 16:51:22 -05:00
Sam Lantinga
41f6fc69e0 Do a second pass to find libraries without a single version digit after the .so
This finds libsndio.so.6.1 on Raspberry Pi
2018-11-23 21:11:11 -08:00
Ryan C. Gordon
8a700e7a89 mir: Removed mir client support.
Fixes Bugzilla #4288.
2018-11-02 21:34:17 -04:00
Sam Lantinga
4f55e0fc37 Fixed bug 4308 - Prebuilt SDL.dll files not compiled with ASLR support (DYNAMICBASE)
Cameron Gutman

The current SDL 2.0.8 and the prerelease SDL 2.0.9 are compiled without the DYNAMICBASE flag to indicate that ASLR may relocate the DLL at load-time. https://docs.microsoft.com/en-us/cpp/build/reference/dynamicbase-use-address-space-layout-randomization?view=vs-2017

When I build SDL.dll myself using the VS2010 project, the DLL has the DYNAMICBASE flag set (as is the default). Similarly, MinGW-w64 also enables ASLR by default on all binaries for a couple years now (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=836365)
2018-11-02 18:07:11 -07:00
Sam Lantinga
59f9488aa2 Mark a subsystem as dummy, not disabled, if it was intended to be compiled in.
From Tom Black:

I'm having problems initializing the sensor module. I'm compiling with a standard ./configure && make && sudo make install, and the module says it's enabled, but SDL_Init(SDL_INIT_EVERYTHING) is failing with SDL_GetError() returning "SDL not built with sensor support".
2018-09-28 21:19:27 -07: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
Ozkan Sezer
91ed631b04 configury, cmake: make wasapi option independent of directx. 2018-09-28 11:30:50 +03:00
Sam Lantinga
bbbc993a43 Fixed mingw-w64 build 2018-09-28 01:00:47 -07:00
Sam Lantinga
b77667a892 Fixed mingw-w64 build 2018-09-28 00:40:35 -07:00
Sam Lantinga
f355625f9c Updated version to 2.0.9 2018-09-26 10:08:14 -07:00
Sam Lantinga
a0acea5bcc Fixed the DirectFB renderer not being enabled in autoconf builds 2018-08-27 11:51:05 -07:00
Sam Lantinga
2ca16d7410 Added a dummy sensor driver 2018-08-21 13:29:21 -07:00
Sam Lantinga
09c276f295 First pass on the new SDL sensor API 2018-08-21 12:11:34 -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
Ryan C. Gordon
f04deb0b0e configure: Make wayland sources depend on generated headers.
Otherwise occasionally the sources will try to compile before the headers it
needs are generated.

Fixes Bugzilla #3977.
2018-08-07 17:28:07 -04:00
Ethan Lee
54ce812205 SDL_exp 2018-08-04 11:52:46 -04:00
Ozkan Sezer
89a9a997ec made the wasapi configury option consistent with others. 2018-07-01 19:50:00 +03:00
Ozkan Sezer
45850bad77 make WASAPI configurable in autofoo and cmake (default is on.)
closes bug #3798.
2018-07-01 17:01:04 +03:00
Ryan C. Gordon
ecd3391777 wayland: Keep protocol XML files in-tree.
Now you don't need the latest Wayland installed to build with
newer protocols supported, as they'll build correctly; even if
your system can't use them, we can make intelligent decisions
at runtime about what's available on the current machine anyhow.

This also simplifies some logic and possible failure cases in
the configure and CMake scripts.

Fixes Bugzilla #4207.

--HG--
extra : amend_source : 1b786977f162f8a9e984f543a044e1a0da80f2bd
2018-06-25 09:37:25 -07:00
Ryan C. Gordon
f881ef4e85 wayland: Implemented xdg-wm-base support.
This is just in parity with the existing zxdg-shell-unstable-v6 code. Making
the Wayland target robust (and uh, with title bars) is going to take a lot
of work on top of this.

--HG--
extra : amend_source : eb632de165fc406527a6627635382c22151223b5
2018-06-24 22:42:36 -07:00
Sam Lantinga
1a687f83fb Fixed bug 4154 - Fix three empty variable tests in configure
Zack Middleton

Running top-level SDL configure on macOS 10.11 resulted in the errors below because automake removed the brackets about the tests.

./configure: line 15756: : command not found
./configure: line 15759: -Iinclude -I/Users/zack/SDL/include -idirafter /Users/zack/SDL/src/video/khronos : No such file or directory
./configure: line 15763: : command not found
2018-05-05 10:31:03 -07:00
Sam Lantinga
a6f6cae8eb Fixed bug 4144 - CMake complains about trailing spaces in sdl2.pc
Azamat H. Hackimov

When you try use SDL2 2.0.8 in CMake project in Linux, it complains about trailing spaces in sdl2.pc:

CMake Error at CMakeLists.txt:147 (add_executable):
  Target "TestSimpleMain" links to item "-L/usr/lib64 -lSDL2 " which has
  leading or trailing whitespace.  This is now an error according to policy
  CMP0004.
2018-04-23 21:55:59 -07:00
Sam Lantinga
548940ff18 Added Mac OpenGL ES configure support 2018-03-12 18:41:06 -07:00
Sam Lantinga
e1aee46bf4 Fixed bug 4101 - configure needs regenerating after changeset 11894 2018-03-02 22:48:15 -08:00