Commit Graph

4744 Commits

Author SHA1 Message Date
Sylvain Becker 6f732d4ee8 Update WhatsNew.txt 2019-04-04 20:24:22 +02:00
Sylvain Becker 458c60e6a4 Update WhatsNew.txt 2019-04-04 20:10:55 +02:00
Sylvain Becker bfdd0b228a Android: remove SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH
java layer runs as if separate mouse and touch was 1,
Use SDL_HINT_MOUSE_TOUCH_EVENTS and SDL_HINT_TOUCH_MOUSE_EVENTS
for generating synthetic touch/mouse events
2019-04-04 17:01:02 +02:00
Sylvain Becker e41576188d Add hint SDL_HINT_MOUSE_TOUCH_EVENTS for mouse events to generate touch events
controlling whether mouse events should generate synthetic touch events
By default SDL will *not* generate touch events for mouse events
2019-04-04 16:51:50 +02:00
Sylvain Becker ab03892ddf Bug 4576: track both FingerId and TrackId 2019-04-04 15:19:00 +02:00
Sylvain Becker e39c0a1f7d Bug 4576: fix wrong scaling 2019-04-03 10:14:42 +02:00
Sylvain Becker 236b86067f Bug 4576: one more warning 2019-04-02 18:07:27 +02:00
Sylvain Becker b45abbb2a7 Bug 4576: fix warning and compile 2019-04-02 17:57:27 +02:00
Sylvain Becker 9b3c2258aa Bug 4576: remove touch/mouse duplication for Android 2019-04-02 17:23:55 +02:00
Sylvain Becker 9d28156f12 Bug 4576: remove touch/mouse duplication for IOS 2019-04-02 17:18:47 +02:00
Sylvain Becker 42de5f97cc Bug 4576: remove touch/mouse duplication for WinRT 2019-04-02 17:13:22 +02:00
Sylvain Becker b086edc915 Bug 4576: remove touch/mouse duplication for Emscripten 2019-04-02 17:10:29 +02:00
Sylvain Becker b8e5c561d8 Bug 4576: remove touch/mouse duplication for Wayland 2019-04-02 17:07:54 +02:00
Sylvain Becker 6bc2d9de1f Bug 4576: remove touch/mouse duplication for linux/EVDEV 2019-04-02 17:03:58 +02:00
Sylvain Becker 1a4c3b57b7 Bug 4576: remove touch/mouse duplication for Windows 2019-04-02 16:58:11 +02:00
Sylvain Becker a3f2c446ef Bug 4576: handle mapping of TouchEvents to MouseEvents at higher level 2019-04-02 16:46:17 +02:00
Sam Lantinga 1febfedf85 configure.in: Rename configure.ac to fix an 'aclocal' warning 2019-04-02 05:31:08 -07:00
Hugh McMaster 14b385f2bf docs: Replace references to configure.in with configure.ac 2019-03-27 20:58:33 +11:00
Hugh McMaster af4bbb3064 configure.in: Rename to configure.ac to fix an 'aclocal' warning
Also rename references in related files.
2019-03-25 23:01:32 +11:00
Sam Lantinga 9a8d5215c6 Handle potentially calling SDL_JoystickUpdate() and SDL_JoystickQuit() at the same time. 2019-03-27 08:17:05 -07:00
Ryan C. Gordon 2fbfe8b912 coreaudio: Set audio callback thread priority.
Fixes Bugzilla #4155.
2019-03-25 12:59:30 -04:00
Ryan C. Gordon 6a3356ab3f Backed out changeset cec31de4e126
This was meant to migrate CoreAudio onto the same SDL_RunAudio() path that
most other audio drivers are on, but it introduced a bug because it doesn't
deal with dropped audio buffers...and fixing that properly just introduces
latency.

I might revisit this later, perhaps by reworking SDL_RunAudio to allow for
this sort of API better, or redesigning the whole subsystem or something, I
don't know. I'm not super-thrilled that this has to exist outside of the usual
codepaths, though.

Fixes Bugzilla #4481.
2019-03-25 12:24:38 -04:00
Ryan C. Gordon 8ab698af15 opengles2: Fix static analysis warning.
Not clear if this could ever dereference NULL in real life, but better safe
than sorry!
2019-03-21 10:39:49 -04:00
Sam Lantinga 01c924fa9e Hopefully fixed the mingw32 build 2019-03-19 17:20:54 -07:00
Sam Lantinga deb7d08c28 Fixed Visual Studio build 2019-03-19 17:05:22 -07:00
Sam Lantinga ac23d78f7a Didn't need to add SDL_windows.h include, that was already included 2019-03-19 16:53:55 -07:00
Sam Lantinga b2e76d860f Fixed Windows RT build 2019-03-19 16:52:09 -07:00
Sam Lantinga a71489221b Fixed archiving the SDL dynamic library on iOS and tvOS 2019-03-19 11:02:43 -07:00
Sam Lantinga a0ac5ffc9f Fixed building with C++ 2019-03-19 10:59:41 -07:00
Sam Lantinga 03fc5eebcb Fixed building with C++ 2019-03-19 10:56:46 -07:00
Sam Lantinga 8177388e5e Fixed declaration of SDL_main_func for C++ 2019-03-19 08:29:34 -07:00
Sam Lantinga 4d8ac6b8b2 Added support for building SDL as a dynamic library on tvOS 2019-03-19 07:53:39 -07:00
Sam Lantinga de82759c84 Added support for building SDL as a dynamic library on iOS 2019-03-19 07:53:33 -07:00
Ryan C. Gordon edebdeb47f testgesture: Make the background gray.
This is so you can see it on systems that have a minimal window manager and
a black background.
2019-03-17 12:45:19 -04:00
Sam Lantinga 82ebe63f9a Fixed Visual Studio build 2019-03-16 19:46:37 -07:00
Sam Lantinga d49f1faeb1 Fixed iOS build 2019-03-16 19:46:27 -07:00
Sam Lantinga cf7c05c282 Fixed Mac OS X build 2019-03-16 19:44:04 -07:00
Sam Lantinga fd946a48dc Fixed configure error if pkg modules aren't available 2019-03-16 19:32:59 -07:00
Sebastian Krzyszkowiak 6311c7cf95 emscripten: force resize event when pixel ratio changes
Without this, applications can't react to changed canvas size on window zoom.
2019-03-16 19:08:59 -07:00
Sam Lantinga b8bd0aa0bd Fixed bug 4450 - SDL_mouse.c fails to compile with CMake generated Visual Studio files if SDL_VIDEO_VULKAN 0/undefined
Max Waine

SDL_mouse.c, if compiled for Windows, requires GetDoubleClickTime to compile (available from winuser.h). Without Vulkan present this fails to compile as the include chain for winuser.h is the following.

SDL_mouse.c -> SDL_sysvideo.h -> SDL_vulkan_internal.h -> SDL_windows.h -> windows.h -> winuser.h.
Problem is that SDL_vulkan_internal.h doesn't include SDL_windows.h if Vulkan isn't present, so under MinGW/GCC it will give a -Wimplicit-function-declaration warning for GetDoubleClickTime, and under MSVC fails to compile completely.

The solution to this would be to simplify the include chain: including SDL_windows.h under the same condition as GetDoubleClickTime (#ifdef __WIN32__) in SDL_mouse.c (or another file that isn't quite so indirectly included).
2019-03-16 19:07:34 -07:00
Sam Lantinga faf97978ea Fixed bug 4511 - SDL_gamecontrollerdb Mapping for Sony Playstation USB controller
Renaud Lepage

Simply submitting a new mapping.
2019-03-16 19:03:13 -07:00
Silent b6a45f1a8d Fixed DualShock 3 mapping 2019-02-14 20:46:58 +01:00
Sam Lantinga 35255342cd Fixed bug 4525 - Fix crash in ALSA_HotplugThread caused by bad return value check
Anthony Pesch

Fix snd_device_name_hint return value check

According to the ALSA documentation, snd_device_name_hint returns 0 on
success, otherwise a negative error code. The code previously only
considered -1 to be an error, which let other error codes through
resulting in a segfault when hints (which was NULL) was dereferenced
2019-03-16 18:48:21 -07:00
Sam Lantinga 55f18d3625 Fixed bug 4544 - SDL2.m4 SDL2.framework patch made it impossible to fail detection
Stian Skjelstad

check if $sdl_framework is set, before checking if directory exists

Patch that was merged here https://hg.libsdl.org/SDL/rev/ad4968de54ec made it impossible for the SDL2 detection to fail, since one of the if statements fails to check if a variable is set or not.

if test -d $sdl_framework; then

can evaluate to true in some shells. I guess it falls into undefined behaviour when looking at the POSIX standard.
2019-03-16 18:45:10 -07:00
Sam Lantinga 8bc59f87ec Fixed CVE-2019-7635 and bug 4498 - Heap-Buffer Overflow in Blit1to4 pertaining to SDL_blit_1.c
Petr Pisar

The root cause is that the POC BMP file declares 3 colors used and 4 bpp palette, but pixel at line 28 and column 1 (counted from 0) has color number 3. Then when the image loaded into a surface is passed to SDL_DisplayFormat(), in order to convert it to a video format, a used bliting function looks up a color number 3 in a 3-element long color bliting map. (The map obviously has the same number entries as the surface format has colors.)

Proper fix should refuse broken BMP images that have a pixel with a color index higher than declared number of "used" colors. Possibly more advanced fix could try to relocate the out-of-range color index into a vacant index (if such exists).
2019-03-16 18:34:33 -07:00
Jimb Esser 0f148eb651 Fix polling left trigger reporting right trigger's values. 2019-03-16 18:12:26 -07:00
Jimb Esser 58ca76bee3 Fix DirectInput error codes being lost 2019-03-16 18:11:09 -07:00
Ethan Lee c528615626 hidapi: Add support for Wii U/Switch USB GameCube controller adapter.
Note that a single USB device is responsible for all 4 joysticks, so a large
rewrite of the DeviceDriver functions was necessary to allow a single device to
produce multiple joysticks.
2019-03-12 20:27:54 -04:00
Sam Lantinga 938a5508d1 Fixed bug 4452 - Please replace AC_HELP_STRING with AS_HELP_STRING
Hugh McMaster

AC_HELP_STRING is deprecated and is considered an obsolete macro in autoconf 2.69.

Please replace AC_HELP_STRING with AS_HELP_STRING.
2019-03-16 17:47:59 -07:00
Sam Lantinga 40e3c015f1 Added missing PKG_CONFIG macros 2019-03-16 17:39:15 -07:00