Commit Graph

184 Commits

Author SHA1 Message Date
Sam Lantinga 1822f97e5f Fixed bug 5346 - Add FreeBSD evdev KBIO keyboard input driver
wahil1976

This patch adds the KBIO text input driver for FreeBSD, which allows text input to fully work without text spilling out into the console. It also supports accented input, AltGr keys and Alt Lock combinations.

Tested with US accent keys layout and various AltGr layouts.
2020-11-11 19:37:47 -08:00
Sam Lantinga 38ed8a955a Fixed bug 5335 - enable joystick/haptic/evdev support by default on FreeBSD
Alex S

...which allows SDL to talk to webcamd/iichid. (Webcamd actually bundles quite a few gamepad drivers.) Note that this does _not_ disable usbhid, both joystick backends will be compiled.
2020-11-11 19:31:03 -08:00
Simon McVittie 8db3171b98 udev: Factor out SDL_EVDEV_GuessDeviceClass
This works on capability bitfields that can either come from udev or
from ioctls, so it is equally applicable to both udev and non-udev
input device detection.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2020-11-11 19:14:34 -08:00
Ryan C. Gordon 010d5fba93 kmsdrm: Make this build with significantly older system libraries.
This allows one to build Raspberry Pi versions on an ancient version of
Raspbian and get both the KMSDRM and RPI video targets built into SDL, giving
maximum binary compatibility from linking against an older glibc, etc, but
also making one library that can access video on all RPi models and OS
releases.
2020-10-26 09:49:09 -04:00
Ozkan Sezer 196cda69f2 build: fix / update sensors (windows) configuration
- SDL_config.h.in: add missing defines SDL_SENSOR_COREMOTION
  and SDL_SENSOR_WINDOWS (configure did set SDL_SENSOR_WINDOWS
  but it never went in SDL_config.h or Makefile.)
- SDL_config.h.cmake: remove duplicated SDL_SENSOR_XXX cmake
  defines.
- autofoo, cmake: check for sensorsapi.h header before enabling
  windows sensors.
2020-10-12 01:02:28 +03:00
Cameron Cawley 59022829f4 riscos: Implement SDL_OpenURL() 2020-10-11 17:32:32 +01:00
Ryan C. Gordon 77c9d73b63 Removed SDL_AndroidOpenURL, added SDL_OpenURL.
Still needs to be wired into Xcode and Visual Studio projects.
2020-10-05 11:30:33 -04:00
Manuel Alfayate Corchete 78c274cb5d kmsdrm: merge patches from Ozkan Sezer for removing c-99'isms and raising libgbm version reqeriments. 2020-09-26 19:18:09 +02:00
Sam Lantinga b0ca8efd29 Re-add check for Metal on x86, where it's not supported. 2020-07-17 22:21:37 -07:00
Ryan C. Gordon 45f5eb0615 configure: On Apple platforms, only exclude Vulkan on x86.
This catches both x86-64 and ARM devices.
2020-07-16 04:37:14 -04:00
Sam Lantinga 968b830d14 Fixed bug 5232 - SDL2 configure script detects Apple Silicon Macs as iPhones; fails to build due to missing components
jackmacwindowslinux

I'm testing my application that uses SDL2 on the new Apple Silicon Macs. I set up the SDL 2.0.12 source code from the website and tried to build it. The first issue I ran into was that it was always building OpenGL ES, even if --disable-video-opengles was passed to configure. OpenGL ES headers do not seem to be present on the Apple Silicon macOS SDK, except for the iOS SDK headers. Then I had problems with the joystick driver, where some classes used on iOS were not available on macOS.

After looking through the configure.ac script a bit, I found that iOS targets are selected when the build host matches "arm*-apple-darwin*". Clang on macOS 11.0 on arm64 reports the host as "arm64-apple-darwin20.0.0", which matches the iOS target. This means that ARM Mac compilation will always be detected as iOS. Unfortunately, there doesn't seem to be an easy way to detect Mac vs. iOS targets, since they now both use the same triplet & compiler for building.

I'm not sure what the best way to fix this is, but maybe there could be an additional target flag to specify whether to build for macOS or iOS? This might break compatibility, though: with this approach, either all old scripts that used configure to build for iOS fail, or all new builds on macOS without a flag fail (silently?).
2020-07-15 16:12:44 -07:00
Ozkan Sezer fe97f01bc6 configure: corretly print --enable-arm-simd default value. 2020-07-05 22:33:10 +03:00
Ryan C. Gordon 3b71ebecd6 configure: Accidentally deleted a ')'
Sorry!
2020-06-27 02:38:13 -04:00
Ryan C. Gordon 363fd52b41 configure/cmake: Disable ARM SIMD and NEON by default.
It's buggy at the moment.
2020-06-26 23:30:59 -04:00
Sam Lantinga 49501a9860 Updated configure with changes from configure.ac 2020-06-04 09:10:49 -07:00
Ryan C. Gordon 8bd3b2c801 configure: fix fcitx tests.
Otherwise Unix systems without D-Bus support will attempt to compile sources
they can't handle.
2020-05-20 16:34:19 -04:00
Ryan C. Gordon a5c654d5c3 configure: Just don't do the -idirafter on QNX.
The compiler understands it, but the "qcc" compiler driver doesn't, and the
standard Khronos headers upset QNX anyhow, since they try to include X11
headers in the __unix__ section.
2020-05-19 13:22:01 -04:00
Ryan C. Gordon 72fdc80512 configure: -idirafter needs a space, -I doesn't.
Some compilers are apparently quite cranky about the -I not having a space!
2020-05-19 12:30:26 -04:00
Ryan C. Gordon 475afe2162 configure: Do a real check for -idirafter anyhow.
(The CMake project cheats around this by asking "are we GCC or Clang?" and I'm
inclined to leave it like that for now.)
2020-05-19 12:08:05 -04:00
Ryan C. Gordon 2f565b4469 configure: Regenerate configure script. 2020-05-19 11:52:15 -04: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
Sam Lantinga ef147d2e29 Enable virtual joystick API by default 2020-04-13 08:13:50 -07:00
James Le Cuirot abcc6706fd build: Don't duplicate Libs in Libs.private in pkg-config file
pkg-config already prepends Libs to Libs.private when you specify
--static so there's no need to duplicate them. Most other projects
don't do this.
2020-04-12 13:24:36 +01:00
James Le Cuirot 99f87a7158 build: Merge pkg-config Libs.private into Libs for static-only builds
A project being built entirely statically will call pkg-config with
--static, which utilises the Libs.private field. Conversely it will
not use --static when not being built entirely statically, even if
there is only a static build of SDL available. This will most likely
cause the build to fail due to underlinking unless we merge the Libs
fields.

This is what the Meson build system does when it generates pkg-config
files. This also also follows the behaviour of sdl2-config.

At the same time, the runtime linker flags are not applicable to
static-only builds so only add them for shared builds.
2020-04-11 23:38:34 +01:00
Ryan C. Gordon d292f6bd4f stdlib: Add SDL_trunc and SDL_truncf 2020-04-10 12:17:14 -04:00
Sam Lantinga 3180ba81af First pass at Windows sensor implementation 2020-04-08 08:34:27 -07:00
Ryan C. Gordon 377f2d35d5 configure: Remove wayland-protocols check from configure and CMake scripts.
We ship these with SDL now, don't need the system versions installed.
2020-04-01 13:43:53 -04:00
Sam Lantinga 891bd82932 Fixed warning building version.rc using mingw-64 2020-03-20 20:33:26 -07:00
Sam Lantinga 1a6f6054c2 Regenerated configure with configure.ac changes 2020-03-20 19:51:54 -07:00
Sam Lantinga 74ba3cb45b Backed out changeset c5bb2de42684 2020-03-20 19:48:26 -07:00
Sam Lantinga c63bb51245 Only build raw input support on Windows 2020-03-20 19:42:59 -07:00
Sam Lantinga 4dea340ca7 Fixed bug 4477 - Support more than 4 XInput-capable devices on Windows
Jimb Esser

Add new RawInput controller API, and improved correlation with XInput/WGI

Reorder joystick init so drivers can ask the others if they handle a device reliably
Do not poll disconnected XInput devices (major perf issue)
Fix various cases where incorrect correlation could happen
Simple mechanism for propagating unhandled Guide button presses even before guaranteed correlation
Correlate by axis motion as well as button presses
Fix failing to zero other trigger
Fix SDL_HINT_JOYSTICK_HIDAPI not working if set before calling SDL_Init()
Add missing device to device names
Disable RawInput if we have a mismatch of XInput-capable but not RawInput-capable devices

Updated to SDL 2.0.13 code with the following notes:
New HID driver: xbox360w - no idea what that is, hopefully urelated
SDL_hidapijoystick.c had been refactored to couple data handling logic with device opening logic and device lists caused some problems, yields slightly uglier integration than previously when the 360 HID device driver was just handling the data.
SDL_hidapijoystick.c now often pulls the device off of the joystick_hwdata structure for some rumble logic, but it appears that code path is never reached, so probably not a problem.
Looks like joystick_hwdata was refactored to not include a mutex in other drivers, maintainers may want to do the same refactor here if that's useful for some reason.
Something changed in how devices get names, so getting generic names.
Had to fix a (new?) bug where removing an XInput controller caused existing controllers (that moved to a new XInput index) to get identified as 0x045e/0x02fd ("it's probably Bluetooth" in code), rendering the existing HIDAPI_IsDevicePresent and new RAWINPUT_IsDevicePresent unreliable.
2020-03-16 12:23:38 -07:00
David Ludwig cc37ee8a0c virtual joysticks: add autotools-build support (Bug 5028)
Autotools support for virtual-joysticks turns it OFF by default.  To turn it
on, pass the following into configure: --enable-joystick-virtual
2020-03-16 00:21:22 -04:00
Sam Lantinga 93ed3c8baf Updated SDL to version 2.0.13 for development builds 2020-03-10 18:25:47 -07:00
Sam Lantinga 983bbf9ef3 Backed out changeset 51622f74dc85 2020-03-10 18:35:31 -07:00
Sam Lantinga 4fb06a2a38 Updated SDL to version 2.0.13 for development builds 2020-03-10 18:25:47 -07:00
Sam Lantinga a8f91340c8 Updated configure with change from last commit 2020-03-02 15:14:52 -08:00
Sam Lantinga 74ed215618 Updated version to 2.0.12 for release candidate build 2020-03-01 14:58:16 -08:00
Sam Lantinga 2cd88ddf99 Temporarily disabled NEON optimizations added for bug 4365
The ABGR to ARGB blit results in an empty surface, this needs to be looked at.
2020-02-27 09:32:03 -08:00
Ryan C. Gordon dd1d8ab62c cmake: more proper sdl2-config.cmake work (thanks, Alexander!)
Fixes Bugzilla #4970.
2020-02-21 15:52:35 -05:00
Ryan C. Gordon be4d488e04 cmake: Backed out changeset 9009d85d3762
This is being replaced by a different patch (see Bugzilla #4970).
2020-02-21 15:51:04 -05:00
Cameron Cawley 8f1a916ac5 Add basic support for compiling on RISC OS 2020-02-13 20:50:47 +00:00
Ryan C. Gordon 229c2f8f5f cmake: Add PACKAGE_VERSION and SDL2_VERSION to sdl2-config.cmake.in
Fixes Bugzilla #4970.
2020-02-14 13:37:32 -05:00
Sam Lantinga 41dad5d7f3 Fixed bug 4357 - iosbuild.sh broken with SDL 2.0.9
Christoph Charles

The new source files for coremotion sensors don't seem to have been included correctly in configure.in. This leads to the build script ios-build.sh to fail at link time, complaining about missing symbols, namely about missing SDL_COREMOTION_SensorDriver.
2019-12-31 10:40:30 -08:00
Sam Lantinga dd5987e80a Fixed bug 4911 - Build broken when hidapi enabled
meyraud705

SDL_hidapi.c is added twice to 'SOURCES' which causes "multiple definition error" when linking.
2019-12-22 13:42:20 -08:00
Sam Lantinga de6397cfff Use SDL_hidapi.c instead of the platform specific hid.c implementations when libusb isn't available 2019-11-25 15:02:48 -08:00
Sam Lantinga 116bd7eb7a Added the Linux hidraw sources when libusb isn't available 2019-11-23 11:35:20 -08:00
Ozkan Sezer d3232a82a0 configure: add back mistakenly removed strtok_r check, and regenerate. 2019-11-21 10:02:02 +03:00
Ozkan Sezer eb8f14bb6a added SDL_strtokr() as a replacement for POSIX strtok_r (bug #4046.) 2019-11-20 20:40:50 +03:00
Anuj Mittal 8bd3398020 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/bb65ba8e039b

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