Commit Graph

6417 Commits (c02d88dd12253b62c9a2298b48843cec88a58c5a)

Author SHA1 Message Date
Sylvain Becker faed7f836d KMSDRM: fix inverted strcmp, remove useless if test (Bug 4624) 2019-06-19 10:11:38 +02:00
Sylvain Becker 5998c51324 KMSDRM: fix compilation on linux, no d_namlen (Bug 4624) 2019-06-19 09:16:53 +02:00
Ryan C. Gordon d0fa93d63c wayland: Fixed C99-style variable declaration inside for-loop. 2019-06-19 00:52:34 -04:00
Sam Lantinga 667c872b42 Fixed building DMG archive on Mac OS X 2019-06-18 21:50:57 -07:00
Ryan C. Gordon 7162649f78 opengl: Be more robust in failing cases.
Load all possible symbols, not just until one fails, in case they get used
during shutdown, etc.

Fixes Bugzilla #4093.
2019-06-18 18:58:39 -04:00
Sam Lantinga 8ab907baa6 Only warp the mouse to set focus if we're definitely going into relative mode 2019-06-18 14:24:26 -07:00
Sam Lantinga 14e8b93e37 Fixed compiler warning 2019-06-18 14:24:24 -07:00
Sam Lantinga 99abcbb2bc Fixed bug 4624 - KMS/DRM fails on FreeBSD because /dev/dri/card* nodes are symlinks
Jan Martin Mikkelsen

Patch to scan /dev/dri based on names rather than file type

Loading KMS/DRM on FreeBSD fails because the "available" code in the driver checks for character device nodes under /dev/dri and the /dev/dri/card* files are symlinks rather than device nodes nodes on FreeBSD. The symlink points to /dev/drm/0.

The attached patch counts /dev/dri/card* entries rather than directory entries which are character devices.
2019-06-18 14:15:10 -07:00
Ryan C. Gordon d3bedda4df cocoa: Patched to compile and also handle possible malloc failure. 2019-06-18 16:53:49 -04:00
Sam Lantinga 3e720d2a80 Fixed potential double-free in mouse cleanup code 2019-06-18 13:41:38 -07:00
Sam Lantinga 5dcac4ccdf Fixed 4669 - Using the software SDL_Renderer on Android leads to GL errors & black screen when window resizes
Sylvain

I think what happening with the software renderer is:

* you're somehow in background (so texture creation is not possible)
* it resizes and wants to push a SDL_WINDOWEVENT_SIZE_CHANGED
It call:
https://hg.libsdl.org/SDL/file/a010811d40dd/src/render/SDL_render.c#l683
* GetOutputSize
* SW_GetOutputSize
* SW_ActivateRenderer
* SDL_GetWindowSurface
* SDL_CreateWindowFramebuffer which is mapped to SDL_CreateWindowTexture
and it ends up re-creating the surface/a texture, while being in background
2019-06-18 10:08:19 -07:00
Sylvain Becker e96d4760ac Android: resize with software rendering, reverted again (Bug 4669) 2019-06-18 18:53:58 +02:00
Sylvain Becker 12b92260cc Android: try to fix resize with software rendering (bug 4669) 2019-06-18 18:40:40 +02:00
Sylvain Becker 8a20d40d90 Android: revert commit SW_GetOutputSize, again (Bug 4669) 2019-06-18 18:22:18 +02:00
Sam Lantinga 63506ae195 Added a patch note about batched rendering 2019-06-18 08:35:31 -07:00
Sam Lantinga e89789bb4b Added patch notes for 2.0.10 2019-06-18 07:55:30 -07:00
Sam Lantinga eb71cd800d Make sure we haven't changed the size of the SDL_Event structure and broken binary compatibility. 2019-06-18 06:53:32 -07:00
Sylvain Becker 5418d41626 Android: prevent ignoring surfaceChanged() in MultiWindow 2019-06-18 11:35:30 +02:00
Sylvain Becker 98cc7589b1 Android: prevent using SW_GetOutputSize with software renderer (Bug 4669) 2019-06-18 10:41:11 +02:00
Sylvain Becker a55c0e1479 Android: revert previous commit (Bug 4669)
(Refs #1)
2019-06-18 10:23:19 +02:00
Sylvain Becker f2157b6c25 Fixed bug 4669: Android software renderer, black screen when window resizes
Using the software SDL_Renderer on Android leads to GL errors & black screen when window resizes
2019-06-17 22:31:36 +02:00
Sam Lantinga 6c4765a17a Removed extraneous fprintf() call 2019-06-17 11:10:20 -07:00
Sam Lantinga 67c67f3a6b Updated version to 2.0.10 2019-06-17 10:13:28 -07:00
Sam Lantinga 93a5e4ce06 Fixed bug 4667 - Build errors on Linux when building without Threads support
Manuel Sabogal

There is an issue on the latest commit of the mercurial repo when SDL_THREADS_DISABLED is set:

src/core/linux/SDL_threadprio.c:79:28: error: unknown type name 'Sint64'; did you mean 'int'
2019-06-17 08:38:33 -07:00
Alex Szpakowski 9306ef9b10 Fix synthetically generated mouse events getting lost forever after the device orientation changes (or the window is otherwise resized) while a finger is touching the screen. 2019-06-16 14:10:30 -03:00
Alex Szpakowski f4625f52f2 iOS: remove some code which could affect the state of UIViews that aren't owned by SDL.
It was originally added to work around an input event problem in the code of a specific app which mixed SDL and native UIViews, but that app solved its problems in a better manner since then.
2019-06-16 13:52:27 -03:00
Ryan C. Gordon fffa791fce assert: Another attempt to quiet compiler warnings. 2019-06-14 22:29:13 -04:00
Ryan C. Gordon 59e510b0b6 assert: Possibly fixing compiler warning on Android. 2019-06-14 21:39:51 -04:00
Ryan C. Gordon ed8b78d36b cocoa: ignore compiler warnings about OpenGL being deprecated. 2019-06-14 21:18:53 -04:00
Ryan C. Gordon 90e2dc9891 A few minor changes to placate static analysis. 2019-06-14 18:23:51 -04:00
Sam Lantinga 4eb3c0c387 Added support for Xbox and PS4 wireless controllers on iOS and tvOS
Also implemented SDL_JoystickGetDevicePlayerIndex() on iOS and tvOS, and added support for reading the new menu button state available in iOS and tvOS 13.
2019-06-14 13:56:52 -07:00
Sam Lantinga 1213fe79d8 Worked around "Undefined symbol: ___isPlatformVersionAtLeast()" link error on Xcode 11 beta 2019-06-14 13:56:42 -07:00
Ryan C. Gordon 289d109245 audio: Attempt to fix build on ARM versions of Visual Studio. 2019-06-14 16:52:42 -04:00
Ryan C. Gordon 33b235f4c3 audio: Fix ARM NEON audio converter bugs.
(Patch from Sylvain, I'm just applying it.)

Fixes Bugzilla #4186.
2019-06-14 15:52:48 -04:00
Ryan C. Gordon 5c56c88824 audio: patched to compile. 2019-06-14 15:47:32 -04:00
Ethan Lee 5bd9b8b167 Check src alignment for S32_to_F32 conversions 2019-06-14 09:51:22 -04:00
Ryan C. Gordon d9a2eff26f cocoa: Another attempt at synthesized mouse/touch events. 2019-06-13 21:31:03 -04:00
Ryan C. Gordon 294574647d cocoa: Revised synthesized mouse/touch event strategy.
I _think_ I understand what Sylvain is working on here now, so hopefully I
got this right.

Fixes Bugzilla #4576.

(I think!)
2019-06-13 01:57:13 -04:00
Alex Szpakowski 50f5123190 macOS: Fix the coordinate space of SDL_GetDisplayUsableBounds (thanks Tim!)
Fixes bug #4518.
2019-06-12 19:57:30 -03:00
Alex Szpakowski 74e86a51d8 iOS: Remove didAddSubview override in NSWindow, its code breaks things which rely on focus changing within SDL's UIWindow (bug #4659). 2019-06-12 19:15:56 -03:00
Ryan C. Gordon 2fa33d6f98 wave: Fixed static analysis warning about dead assignment.
(technically, this function never returns an error at this point, but since
it _does_ have an "uhoh, is this corrupt data?" comment that it ignores, we
should probably make sure we handle error cases in the future.  :)  )
2019-06-12 15:43:08 -04:00
Ryan C. Gordon 32ead2cb46 vulkan: Fixed use-after-free bug. 2019-06-12 15:37:07 -04:00
Ryan C. Gordon b530d75afb assert: Fixed some compiler warnings. 2019-06-12 15:35:06 -04:00
Sam Lantinga 747df96eb0 Better patch to make it more clear what's going on 2019-06-12 10:38:49 -07:00
Sam Lantinga 3fbaa5da05 The hat index passed to the application should be zero-based with no holes 2019-06-12 10:35:47 -07:00
Sam Lantinga a1a2f9b9f8 Fixed bug 4486 - Segfault when pressing a trigger on the Steam Controller (Linux)
Matteo Beniamino

Pressing a trigger button on a Steam Controller causes a segmentation fault both with stable version and latest mercurial head on Linux. I'm using the recent hid_steam kernel module with lizard_mode disabled (that is no keyboard/mouse emulation). I suspect this is what's happening: the driver exposes two hats. The two hats have indices 0 and 2. Inside linux/SDL_sysjoystick.c two hats are allocated in allocate_hatdata for joystick->hwdata->hats. In HandleHat function the hat parameter (that can be 2) is directly used as the index of the array that only has two elements, causing an out of bounds access. SDL is not expecting to have "holes" between hats indices.

The index 2 is calculated in HandleInputEvents() as (ABS_HAT2X - ABS_HAT0X) / 2 where ABS_HAT2X is the value associated to the hat inside the hid_steam module.
2019-06-12 10:32:36 -07:00
Sam Lantinga d01150abc2 Fixed bug 4665 - Add support for single touch evdev devices
Jan Martin Mikkelsen

The attached patch adds support for single-touch evdev devices.

These devices report ABS_X, ABS_Y and BTN_TOUCH events. This patch sets them up as MT devices with a single slot and handles the appropriate messages.
2019-06-12 07:55:48 -07:00
Sebastian Krzyszkowiak 797b28133c wayland: HiDPI support 2019-06-12 00:55:05 +02:00
Ozkan Sezer 09142eb715 fix permissions 2019-06-12 13:56:20 +03:00
Sylvain Becker cd011bb1e7 SDL_Wave: missing field 'length' initializer 2019-06-12 10:42:02 +02:00