Commit Graph

6680 Commits (19236b462a8af09670c9fd5490cea293d3fc2b75)

Author SHA1 Message Date
Sylvain Becker 39690a0478 Fix static analysis warning in SDL_render.c 2020-05-15 21:33:47 +02:00
Sylvain Becker 5b65e0af01 Fixed bug 5100 - compilation CMake Android armeabi-v7a (Thanks Steve Robinson!)
fatal error: 'cpu-features.h' file not found on CMake Android armeabi-v7a
2020-05-15 21:12:23 +02:00
Ryan C. Gordon d31dac1563 docs: README-linux.md updated for a modern Ubuntu release. 2020-05-14 21:54:51 -04:00
Ryan C. Gordon ec2d70364a docs: Fixed README-linux.md's line endings and word wrap. 2020-05-14 21:49:29 -04:00
Ryan C. Gordon 2d5de8faf9 docs: Linux systems don't need to install wayland-protocols anymore.
We ship the protocol xml files we need with SDL's sources now.
2020-05-14 21:48:24 -04:00
Ryan C. Gordon daf360e040 emscripten: Fix crash in SDL_SetWindowTitle().
This patch came from emscripten-ports, thanks!

Fixes Bugzilla #5133.
2020-05-13 16:48:42 -04:00
Tudor Brindus 1a291ab118 wayland: add support for SDL_SetWindowGrab 2020-04-17 13:55:44 -04:00
Sam Lantinga b47f577a9d Fixed bug 5098 - macOS CreateWindowFrom doesn't work with high-dpi displays
michaeljosephmaltese

Display ends up taking only 1/4 of the screen area. It needs to call "setWantsBestResolutionOpenGLSurface:highdpi", like when creating a window the normal way.
2020-05-11 14:36:23 -07:00
Sam Lantinga eadc8693dd Fixed bug 5103 - Port fcitx support to both fcitx 4 & 5
wengxt

Due to the new major fcitx version is coming close, the existing code need to be ported to use new Fcitx dbus interface.

The new dbus interface is supported by both fcitx 4 and 5, and has a good side effect, which is that it will work with flatpak for free. Also the patch remove the dependency on fcitx header. Instead, it just hardcodes a few enum value in the code so need to handle the different header for fcitx4 or 5.
2020-05-11 14:31:04 -07:00
Sylvain Becker 33642b47b2 Android: robustness if locale failed to be detected at start 2020-05-08 21:50:23 +02:00
Sylvain Becker 2491f16f85 Android: send SDL_LOCALECHANGED when locale changes 2020-05-08 21:40:28 +02:00
Sylvain Becker 2a4ddeeea9 Android: fix missing prototype warning 2020-05-08 11:15:38 +02:00
Sylvain Becker 0059ace0b4 Android: factorize asset manager code (bug 2131 and 4297) 2020-05-08 11:00:51 +02: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 1e5dd06f83 Added support for the HORI Real Arcade Pro on Mac OSX and Linux 2020-05-06 12:19:58 -07:00
Sam Lantinga cd2bdaef1c ControllerList: add PDP Faceoff Deluxe Audio Switch Controller and HORI Real Arcade Pro V Switch Edition 2020-05-06 11:19:52 -07:00
Sam Lantinga 0e5b48d2d8 ControllerList: add NACON Revolution Unlimited (and it's dongle) and NACON Daija fight stick. 2020-05-06 11:19:47 -07:00
Ryan C. Gordon b3a34c94e0 hid: Add Microsoft Precision Mouse to the joystick blacklist.
Same deal as the Razer keyboards, it hangs the enumeration.
2020-05-06 03:18:25 -04:00
Ryan C. Gordon 85d97410d4 hid: Cleanup Windows joystick blacklist code, to make additions easier. 2020-05-06 03:13:44 -04:00
Ryan C. Gordon b0a20a153c stdlib: Fixed compiler warnings about int vs size_t. 2020-05-05 12:48:55 -04:00
Sam Lantinga 0eb6512b53 Fixed bug 5121 - Use SDL_calloc instead of calloc in Wayland_CreateWindow
meyraud705

'SDL_Windows::driverdata' of a Wayland window is allocated by calloc in 'Wayland_CreateWindow' but freed by SDL_free in 'Wayland_DestroyWindow'.
2020-05-04 13:19:26 -07:00
Sam Lantinga 65ad45340d Improvement for bug 3446 - The haptic API does not allow to select the direction axes
meyraud705

I see how the documentation is confusing. I think that the choice of the axis is an implementation detail. The documentation should state the goal of this value, so I propose this wording:

    "Use this value to play an effect on the steering wheel axis. This provides
     better compatibility across platforms and devices as SDL will guess the
     correct axis."

Value could even be renamed 'SDL_HAPTIC_STEERING_AXIS'.

For Linux, sending an effect on the X axis with a Logitech wheel works. Others brands don't have driver for Linux as far as I know.
2020-05-04 13:17:43 -07:00
Sam Lantinga 11723411ab Added support for the Razer Kishi 2020-05-04 10:16:10 -07:00
Ryan C. Gordon 8601996fbc hints: Allow specifying audio device metadata.
This is only supported on PulseAudio. You can set a description when opening
your audio device that will show up in pauvcontrol, which lets you set
per-stream volume levels.

Fixes Bugzilla #4801.
2020-05-03 22:13:48 -04:00
Ryan C. Gordon 11fef299d1 hints: Fixed a doxygen comment. 2020-05-03 20:56:18 -04:00
Sam Lantinga 8b60d39cb0 Fixed bug 5112 - CMake won't compile in VS2019
dark_sylinc

Trying to build SDL with VS2019 using CMake will encounter a linking error

More specifically:

    1>SDL_string.obj : error LNK2019: unresolved external symbol memset referenced in function SDL_vsnprintf_REAL
2020-05-02 14:43:17 -07:00
Sam Lantinga 05a60c2ea3 Fixed showrev.sh when using the Bourne shell 2020-04-29 15:32:08 +00:00
Sam Lantinga beab15b09e Added additional logging to track down why the NVIDIA controller doesn't send the back button 2020-04-27 19:12:02 -07:00
Sam Lantinga b0b12e46ba Fixed running on older versions of iOS 2020-04-27 13:31:10 -07:00
Ryan C. Gordon 7ac827102a cmake: various Haiku settings were accidentally under "if(SDL_VIDEO)" 2020-04-24 02:06:53 -04:00
Sam Lantinga 01fd8130fd Fixed compiler warning 2020-04-23 11:13:02 -07:00
Sam Lantinga c6b24b4b7c Added support for the following controllers:
* 8BitDo N30 Pro 2
* 8BitDo SN30 Gamepad
* 8BitDo SN30 Pro+
* 8BitDo Zero 2
* SZMY-POWER PC Gamepad
* ThrustMaster eSwap PRO Controller
* ZEROPLUS P4 Wired Gamepad

In additional, all 8BitDo controllers use SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS to have the correct mapping based on user preferences.
2020-04-23 11:07:07 -07:00
Sam Lantinga 4727f79416 Don't use the WGI driver if another driver is already handling the joystick 2020-04-23 10:13:17 -07:00
Sam Lantinga 6ca7f510ae Fixed crash trying to get battery status on some devices 2020-04-23 09:35:32 -07:00
Sam Lantinga 0f374b069b Fixed build on older Visual Studio, enable new features on newer Visual Studio 2020-04-22 15:42:32 -07:00
Sam Lantinga 589d636bb9 Fixed rare crash when creating an X11 window 2020-04-22 14:57:06 -07:00
Sam Lantinga d12ea89c1e Added support for the following controllers:
* PDP Afterglow Switch Controller
* Thrustmaster ESwap Pro PS4 controller
* Giotek VX4
* Generic PS4 controller vid/pid that several knock offs use
2020-04-22 10:50:50 -07:00
Ryan C. Gordon 3625b83c63 hid: Add Razer Arctosa keyboard to hid enumeration blacklist.
Hangs SDL, same as the Razer Lycosa.

Fixes Bugzilla #5101.
2020-04-21 01:32:48 -04:00
Ryan C. Gordon 09ca66bf66 SDL_error: simplified error string management.
This patch removes deferred error string formatting: now we do it during
SDL_SetError(), so there's no limit on printf-style arguments used.

Also removes stub for managing error string translations; we don't have the
facilities to maintain that and the way we set arbitrary error strings
doesn't really make this practical anyhow.

Since the final error string is set right away and unique to the thread,
we no longer need a static buffer for legacy SDL_GetError(), and we don't
have to allocate 5x 128-byte argument fields per-thread. Also, since we now
use SDL_vsnprintf instead of parsing the format string ourselves, there's a
lot of code deleted and we have access to more robust formatting powers now.

This does mean the final error strings can't be more than 128 bytes, down
from the theoretical maximum of around 768, but I think this is probably okay.
They might truncate but they will always be null-terminated!

Fixes Bugzilla #5092.
2020-04-21 01:30:36 -04:00
Ryan C. Gordon 67760f0ed7 joystick: Don't report duplicate recentering events for game controllers. 2020-04-20 18:58:18 -04:00
Ryan C. Gordon c5f2a1ce4e joystick: On disconnect, recenter all game controller inputs.
The joystick layer can't necessarily give us perfect centering, but we know
that the game controller level has logical absolute idle positions that have
nothing to do with the physical device.

So send game controller events to make it look like the device is completely
untouched before sending the final removal event.
2020-04-20 16:01:36 -04:00
Sam Lantinga 116b8c17f2 Note which Windows SDK version is required for Windows Gaming Input support 2020-04-19 00:05:54 -07:00
Sam Lantinga aba2792896 Added a Windows Gaming Input joystick driver
This driver supports the Razer Atrox Arcade Stick

Some of the quirks of this driver, inherent in Windows Gaming Input:
* There will never appear to be controllers connected at startup. You must support hot-plugging in order to see these controllers.
* You can't read the state of the guide button
* You can't get controller events in the background
2020-04-18 21:41:37 -07:00
Sam Lantinga b90b59279e Added support for the Razer Atrox Arcade Stick 2020-04-17 21:30:58 -07:00
Sam Lantinga dbcda0b212 Added support for the Razer Wolverine Ultimate 2020-04-17 21:30:56 -07:00
Sam Lantinga 2b32385502 Don't send rumble packets too quickly to Nintendo Switch Pro controllers over Bluetooth 2020-04-17 15:08:48 -07:00
Sam Lantinga c02f54a0ed Fixed the default face button mapping for Nintendo Switch Pro controllers 2020-04-17 15:08:46 -07:00
Ryan C. Gordon eaaa809e40 hidapi: Blacklist the Razer Lycosa keyboard from enumeration.
It's not a joystick and it hangs device enumeration.
2020-04-15 13:33:09 -04:00
Ryan C. Gordon a7a4e16b5b haiku: Patched to compile. 2020-04-15 13:31:54 -04:00
Sam Lantinga a990a34ac4 Cleanly switch between audio recording, playback, and both, on iOS 2020-04-14 22:26:02 -07:00