Log

Author Commit Date CI Message
Ryan C. Gordon 66d4d8e2 2019-07-08T16:46:52 cmake: Added HIDAPI support.
Ryan C. Gordon 4df22d81 2019-07-08T16:08:16 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.)
Ryan C. Gordon e841b066 2019-07-08T13:41:01 cocoa: Another attempt at mouse vs touch support. This time, we make anything we think is a MacBook trackpad report its touches as SDL_MOUSE_TOUCHID, even though they're not _actually_ synthesized events, and let all mouse input--even if the OS synthesized it from a multitouch trackpad on our behalf--look like physical input. This is backwards from reality, but produces the results most apps will expect. Note that if you have a real touch device that doesn't appear to be the trackpad, it'll produce real touch events with unique device ids, so it's not a total loss here, but also note that the way we decide if it was the trackpad is an imperfect heuristic; it happens to work out right now, but it's not impossible that a real touchscreen could come to the Mac at some point and (incorrectly?) call it a "mouse" input, etc. But for now, good enough. Fixes Bugzilla #4690.
Cameron Gutman 7e09718d 2019-07-07T11:23:16 Ignore synthetic mouse events generated for touchscreens Windows generates fake raw mouse events for touchscreens for compatibility with legacy apps that predate touch support in Windows. We already handle touch events explicitly, so drop the synthetic events to avoid duplicates.
Sam Lantinga 680e7937 2019-07-07T09:10:56 Fixed bug 4710 - audio/alsa: avoid configuring hardware parameters with only a single period Anthony Pesch The previous code first configured the period size using snd_pcm_hw_par- ams_set_period_size_near. Then, it further narrowed the configuration space by calling snd_pcm_hw_params_set_buffer_size_near using a buffer size of 2 times the _requested_ period size in order to try and get a configuration with only 2 periods. If the configured period size was larger than the requested size, the second call could inadvertently narrow the configuration space to contain only a single period. Rather than fixing the call to snd_pcm_hw_params_set_buffer_size_near to use a size of 2 times the configured period size, the code has been changed to use snd_pcm_hw_params_set_periods_min in order to more clearly explain the intent.
Sam Lantinga 67bb882e 2019-07-03T15:57:55 Fixed bug 4707 - SDL_SetRelativeMouseMode fails on Vivante Cameron Gutman The bugfix in https://hg.libsdl.org/SDL/rev/ca9417a52f18 caused SDL_SetRelativeMouseMode() to begin failing on Vivante (Steam Link). Even though Vivante doesn't have a SetRelativeMouseMode() or WarpMouse() function, it's in relative mode already (because it uses evdev) so the function was actually working as intended. I think providing a no-op SetRelativeMouseMode() function for Vivante is a reasonable fix. Since it's already getting relative events through evdev, it really is a no-op to "enter relative mode". In fact, this is probably the right thing to do for all backends that use evdev (vivante, raspberry, and kmsdrm). Raspberry and kmsdrm both have WarpMouse() implementations so SDL_SetRelativeMouseMode() isn't failing there, but it still seems to make sense not to have to do the fake warping if they're evdev-based anyway.
Sylvain Becker f994da0e 2019-07-03T13:37:54 Fixed bug 4702 - Android back button does not send SDL_KEYDOWN event fallback when event.getSource() is SOURCE_UNKNOWN
Sam Lantinga 3fc447df 2019-07-03T02:37:15 Fixed bug 4708 - testdropfile: double-free Juha Niemim?ki SDLTest_CommonEvent seems to free the file name so testdropfile prints some garbage to console and crashes when freeing the name again.
Ryan C. Gordon b46c7719 2019-07-02T16:49:35 raspberry: Actually commit the whole patch. :) (Thanks, Joe!) Fixes Bugzilla #4699.
Ryan C. Gordon d2d06f44 2019-07-02T12:29:36 cocoa: Don't report trackpad mouse events as synthesized touches. Fixes Bugzilla #4690, sort of. I guess.
Ryan C. Gordon d2058b45 2019-07-02T10:26:54 raspberry: Fixed missing mouse cursor (thanks, Joe!) "Starting with changeset 12433, the mouse cursor is not displayed on the Raspberry Pi platform, due to a bug in the handling of the new "global_cursor" in RPI_ShowCursor(). Currently, if cursor == global_cursor, the function immediately returns 0. The function should not return here. Instead, if cursor == global_cursor, it shouldn't try to hide the current cursor and update global_cursor = cursor. However, it *should* still continue through the rest of the function." Fixes Bugzilla #4699.
Ryan C. Gordon d5ebbcb4 2019-07-02T09:43:26 dbus: Don't SimulateUserActivity if we're already inhibiting the screensaver.
Ryan C. Gordon 94658099 2019-07-02T09:38:31 dbus: Add org.freedesktop.ScreenSaver.SimulateUserActivity support.
Alex Szpakowski 027887da 2019-07-01T14:52:56 iOS: Fix the window size not being set properly when Split View is used on an iPad (bug #4586).
Sam Lantinga 972bdfb4 2019-07-01T09:05:15 Made it more explicit that 2.0.10 and newer are required for the SDL_RW* functions
Sam Lantinga 60606dfb 2019-07-01T09:02:04 Documented that the SDL_RW* macros no longer exist, and you can't use an older SDL library if you build with SDL 2.0.10.
Sam Lantinga 959cfc42 2019-06-30T23:58:31 Fixed memory barrier macro check so it isn't quite so fragile
Sam Lantinga a8bea858 2019-06-30T23:55:28 Limit the compile error to the case where we actually define the memory barrier macro as the function
Sam Lantinga cc47810d 2019-06-30T23:26:16 Fixed bug 4683 - SDL_atomic infinite recursion on armv6/armv5 w/ thumb The real problem is that SDL_atomic.c was built in thumb mode instead of ARM mode, which is required to use the mcr instruction on ARM platforms. Added a compiler error to catch this case so we don't generate code that does infinite recursion. I also added a potentially better way to handle things on Linux ARM platforms, based on comments in the Chromium headers, which we can try out after 2.0.10 ships.
Sam Lantinga 797d2c59 2019-06-30T22:48:13 Fixed bug 4436 - [OpenBSD] fix D-pad daniel.c.sinclair Hi, this patch breaks dpad/hat input on my PS4 controller. The attached patch restores functionality. Calling SDL_PrivateJoystickHat() at the end of BSD_JoystickUpdate was setting the hat state to zero on every kind of input, instead of just the HUG_DPAD events.
Sylvain Becker 22a2decf 2019-06-28T16:38:42 Android: concurrency issues, make sure Activity is in running State when calling functions like SDL_CreateWindow, SDL_CreateRenderer, Android_GLES_CreateContext Bugs 4694, 4681, 4142
Sylvain Becker cfed0b77 2019-06-28T16:14:50 Add an "error" label in SDL_CreateRenderer (no op)
Sylvain Becker aa45af7f 2019-06-28T16:05:20 Android: explicitly expand Android_GLES_MakeCurrent/Android_GLES_CreateContext from SDL_egl_c.h
Ryan C. Gordon 57e08c27 2019-06-26T13:21:43 cocoa: Check for capslock in -[NSResponder flagsChanged], not with IOKit. Using IOKit for this pops up a warning at startup on macOS 10.15 ("Catalina"), asking the user to authorize the app to listen to all keyboard input in the system, which is unacceptable. I _think_ we were using IOKit under incorrect presumptions here; the Stack Overflow link mentioned in it was complaining about not being able to use flagsChanged to differentiate between left and right mod keys, but that's not an issue for capslock. It's also possible this code was trying to deal with capslock changing when the window didn't have focus, but we handle this elsewhere now, if we didn't at the time.
Ryan C. Gordon 0beadea5 2019-06-26T01:29:01 windows: Call GetWindowText() with the correct parameters (thanks, Zebediah!) GetWindowText() wants you to tell it the size of the buffer--including the terminating NULL char--but we weren't counting that last char, losing the last char of the string in the process. This was only seen with the special case of SDL_CreateWindowFrom() to use an existing native window, not the usual SDL_CreateWindow() codepath. Fixes Bugzilla #4696.
Ozkan Sezer 282b2b93 2019-06-25T11:47:02 define __ARM_NEON for Windows only if _M_ARM or _M_ARM64 is defined. fixes Visual Studio builds.
Ozkan Sezer 83a713f1 2019-06-24T23:51:10 update version in os/2 makefile
Ozkan Sezer bcb357d4 2019-06-24T23:50:20 fix permissions
Sylvain Becker ccba8d46 2019-06-24T18:08:11 Android: export Lock/Unlock activity API
Sam Lantinga 7f78d0f0 2019-06-21T22:01:27 Fixed bug 4684 - GLES1 variables missing under Android with CMake Braden Obrzut https://hg.libsdl.org/SDL/file/7dc39b047055/CMakeLists.txt#l911 I believe the following should also be specified there: set(SDL_VIDEO_OPENGL_ES 1) set(SDL_VIDEO_RENDER_OGL_ES 1) As it is now GLES1 support is missing when building for Android despite it linking to the library.
Ryan C. Gordon 31bb95f1 2019-06-21T15:07:39 direct3d: Use D3DPOOL_DEFAULT for vertex buffers after all, release correctly. Fixes Bugzilla #4679. Fixes Bugzilla #4537.
Sam Lantinga 51555a85 2019-06-21T10:58:30 Enable Raspberry Pi video by default
Cameron Gutman e681623c 2019-06-20T19:51:00 direct3d: Fix dirty textures failing to update Even if the texture itself has not changed since last time, the data may have so we must call UpdateDirtyTexture() to handle that possibility.
Sam Lantinga f3226457 2019-06-19T17:11:20 Fixed bug 4672 - Warnings in SDL_LogEvent()
Sam Lantinga be6cda9f 2019-06-19T15:54:21 Rolling back GameCube HIDAPI support It causes the HIDAPI devices to always be opened on enumeration, which causes crashes in the Windows drivers when multiple applications are reading and writing at the same time. We can revisit this after 2.0.10 release.
Zack Middleton 56e2b9a4 2019-06-19T06:43:54 Handle GameCube WaveBird controller differences Make wireless GameCube controllers use unknown power level instead of wired and don't allow rumble (it doesn't have hardware for it).
Zack Middleton 6f63c1c3 2019-06-19T06:43:36 Make GameCube controllers only rumble if both USB cables are connected The Nintendo USB GameCube Adapter has two USB connectors. Black for data and grey for additional power for rumble. The Wii U and other software require both cables to use rumble. The rumble is weaker without the second USB cable. Other than that I don't know if there is any negative side affects from using rumble with only one cable.
Zack Middleton b23cce28 2019-06-19T06:43:04 Fix GameCube controller power level being reset to unknown HIDAPI_DriverGameCube_OpenJoystick() set power level to wired and then it was set to unknown in SDL_JoystickOpen().
Sam Lantinga bd952900 2019-06-19T06:40:50 Use SDL C runtime functions
Sylvain Becker faed7f83 2019-06-19T10:11:38 KMSDRM: fix inverted strcmp, remove useless if test (Bug 4624)
Sylvain Becker 5998c513 2019-06-19T09:16:53 KMSDRM: fix compilation on linux, no d_namlen (Bug 4624)
Ryan C. Gordon d0fa93d6 2019-06-19T00:52:34 wayland: Fixed C99-style variable declaration inside for-loop.
Sam Lantinga 667c872b 2019-06-18T21:50:57 Fixed building DMG archive on Mac OS X
Ryan C. Gordon 7162649f 2019-06-18T18:58:39 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.
Sam Lantinga 8ab907ba 2019-06-18T14:24:26 Only warp the mouse to set focus if we're definitely going into relative mode
Sam Lantinga 14e8b93e 2019-06-18T14:24:24 Fixed compiler warning
Sam Lantinga 99abcbb2 2019-06-18T14:15:10 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.
Ryan C. Gordon d3bedda4 2019-06-18T16:53:49 cocoa: Patched to compile and also handle possible malloc failure.
Sam Lantinga 3e720d2a 2019-06-18T13:41:38 Fixed potential double-free in mouse cleanup code
Sam Lantinga 5dcac4cc 2019-06-18T10:08:19 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
Sylvain Becker e96d4760 2019-06-18T18:53:58 Android: resize with software rendering, reverted again (Bug 4669)
Sylvain Becker 12b92260 2019-06-18T18:40:40 Android: try to fix resize with software rendering (bug 4669)
Sylvain Becker 8a20d40d 2019-06-18T18:22:18 Android: revert commit SW_GetOutputSize, again (Bug 4669)
Sam Lantinga 63506ae1 2019-06-18T08:35:31 Added a patch note about batched rendering
Sam Lantinga e89789bb 2019-06-18T07:55:30 Added patch notes for 2.0.10
Sam Lantinga eb71cd80 2019-06-18T06:53:32 Make sure we haven't changed the size of the SDL_Event structure and broken binary compatibility.
Sylvain Becker 5418d416 2019-06-18T11:35:30 Android: prevent ignoring surfaceChanged() in MultiWindow
Sylvain Becker 98cc7589 2019-06-18T10:41:11 Android: prevent using SW_GetOutputSize with software renderer (Bug 4669)
Sylvain Becker a55c0e14 2019-06-18T10:23:19 Android: revert previous commit (Bug 4669) (Refs #1)
Sylvain Becker f2157b6c 2019-06-17T22:31:36 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
Sam Lantinga 6c4765a1 2019-06-17T11:10:20 Removed extraneous fprintf() call
Sam Lantinga 67c67f3a 2019-06-17T10:13:28 Updated version to 2.0.10
Sam Lantinga 93a5e4ce 2019-06-17T08:38:33 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'
Alex Szpakowski 9306ef9b 2019-06-16T14:10:30 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.
Alex Szpakowski f4625f52 2019-06-16T13:52:27 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.
Ryan C. Gordon fffa791f 2019-06-14T22:29:13 assert: Another attempt to quiet compiler warnings.
Ryan C. Gordon 59e510b0 2019-06-14T21:39:51 assert: Possibly fixing compiler warning on Android.
Ryan C. Gordon ed8b78d3 2019-06-14T21:18:53 cocoa: ignore compiler warnings about OpenGL being deprecated.
Ryan C. Gordon 90e2dc98 2019-06-14T18:23:51 A few minor changes to placate static analysis.
Sam Lantinga 4eb3c0c3 2019-06-14T13:56:52 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.
Sam Lantinga 1213fe79 2019-06-14T13:56:42 Worked around "Undefined symbol: ___isPlatformVersionAtLeast()" link error on Xcode 11 beta
Ryan C. Gordon 289d1092 2019-06-14T16:52:42 audio: Attempt to fix build on ARM versions of Visual Studio.
Ryan C. Gordon 33b235f4 2019-06-14T15:52:48 audio: Fix ARM NEON audio converter bugs. (Patch from Sylvain, I'm just applying it.) Fixes Bugzilla #4186.
Ryan C. Gordon 5c56c888 2019-06-14T15:47:32 audio: patched to compile.
Ethan Lee 5bd9b8b1 2019-06-14T09:51:22 Check src alignment for S32_to_F32 conversions
Ryan C. Gordon d9a2eff2 2019-06-13T21:31:03 cocoa: Another attempt at synthesized mouse/touch events.
Ryan C. Gordon 29457464 2019-06-13T01:57:13 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!)
Alex Szpakowski 50f51231 2019-06-12T19:57:30 macOS: Fix the coordinate space of SDL_GetDisplayUsableBounds (thanks Tim!) Fixes bug #4518.
Alex Szpakowski 74e86a51 2019-06-12T19:15:56 iOS: Remove didAddSubview override in NSWindow, its code breaks things which rely on focus changing within SDL's UIWindow (bug #4659).
Ryan C. Gordon 2fa33d6f 2019-06-12T15:43:08 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. :) )
Ryan C. Gordon 32ead2cb 2019-06-12T15:37:07 vulkan: Fixed use-after-free bug.
Ryan C. Gordon b530d75a 2019-06-12T15:35:06 assert: Fixed some compiler warnings.
Sam Lantinga 747df96e 2019-06-12T10:38:49 Better patch to make it more clear what's going on
Sam Lantinga 3fbaa5da 2019-06-12T10:35:47 The hat index passed to the application should be zero-based with no holes
Sam Lantinga a1a2f9b9 2019-06-12T10:32:36 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.
Sam Lantinga d01150ab 2019-06-12T07:55:48 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.
Ozkan Sezer 09142eb7 2019-06-12T13:56:20 fix permissions
Sylvain Becker cd011bb1 2019-06-12T10:42:02 SDL_Wave: missing field 'length' initializer
Sam Lantinga 39733dc6 2019-06-11T19:58:10 Fixed bug 4615 - RPM Build fails due to unpackaged files devbeer The current SDL2.spec fails to build with: Checking for unpackaged file(s): /usr/lib/rpm/check-files /tmp/build/rpmbuild/BUILDROOT/SDL2-2.0.9-2.x86_64 error: Installed (but unpackaged) file(s) found: /usr/lib64/cmake/SDL2/sdl2-config.cmake RPM build errors: Installed (but unpackaged) file(s) found: /usr/lib64/cmake/SDL2/sdl2-config.cmake
Ryan C. Gordon f5a34785 2019-06-11T21:57:30 assert: mark SDL_ExitProcess as SDL_NORETURN again. Put in a hack to (hopefully) make MingW happy. Fixes Bugzilla #4100.
Sam Lantinga 69d27a69 2019-06-11T18:13:46 Fixed bug 4570 - Support Vulkan Portability rather than MoltenVK specifically Dzmitry Malyshau Current code, search paths, and error messages are written to only consider MoltenVK on macOS as a Vulkan Portability implementation. It's not the only implementation available to the users. gfx-portability [1] has been shown to run a number of titles well, including Dota2, Dolphin Emulator, and vkQuake3, often out-performing MoltenVK in frame rate and stability (see Dolphin benchmark [2]). There is no reason for SDL to be that specific, it's not using any MVK-specific functions other than the WSI initialization ("VK_MVK_macos_surface"). gfx-portability exposes this extension as well, and a more generic WSI extension is in process. It would be good if SDL was written in a more generic way that expect a Vulkan Portability library as opposed to MoltenVK specifically. [1] https://github.com/gfx-rs/portability [2] https://gfx-rs.github.io/2019/03/22/dolphin-macos-performance.html
Sebastian Krzyszkowiak 797b2813 2019-06-12T00:55:05 wayland: HiDPI support
Ryan C. Gordon 04b50f6c 2019-06-11T16:19:01 cocoa: Backed out CVDisplayLink code for macOS vsync. This was to deal with broken vsync support in macOS 10.14, which we assumed would remain broken indefinitely, but a later 10.14 released fixed it. This is a loss of late-swap support, but there are several subtle problems in our CVDiplayLink code that are also evaporating, to be fair. Fixes Bugzilla #4575. (Backed out changeset 8760fed23001)
Ryan C. Gordon 3e9bf284 2019-06-11T15:06:35 software: Fixed compiler warning and dos2unix'd the endlines.
Ryan C. Gordon 04fedce0 2019-06-11T14:09:53 software: Correctly track viewport and cliprect. Fixes Bugzilla #4457.
Ryan C. Gordon a2f2b735 2019-06-11T13:02:56 direct3d: Use D3DPOOL_MANAGED for vertex buffers. Fixes Bugzilla #4537.
Sam Lantinga aa80d279 2019-06-11T08:33:30 Fix build with the 10.10 SDK
Ryan C. Gordon f7b7a972 2019-06-11T10:12:47 direct3d: Fixed SDL_RenderSetClipRect usage. Fixes Bugzilla #4459.
Ryan C. Gordon 4f59d372 2019-06-11T09:29:48 direct3d: don't dereference bogus pointer if current texture was destroyed. Fixes Bugzilla #4460.
Sylvain Becker 4392c6ff 2019-06-11T11:01:15 Android: fix coordinates for Surface.ROTATION_180 https://discourse.libsdl.org/t/android-screen-orientation-issues-2-0-9/26262