Log

Author Commit Date CI Message
Sylvain c93e3b36 2021-04-28T10:43:28 Fixed bug #2881 - SDL_RLEsurface may encode RGB888 if it has no color key (Thanks Simon Hug) To encode with BLEND mode, it needs a valid alpha channel
Sylvain b6264297 2021-04-27T11:10:41 Merge remote-tracking branch 'refs/remotes/origin/main'
Sylvain f8695185 2021-04-27T11:07:51 Audio: normalize conversion Stereo to 5.1, Quad to 7.1, 5.1 to 7.1 (bug #4104)
Sylvain 21349901 2021-04-27T10:57:48 Audio: convert 5.1 to 7.1, use right-surround for r-front and r-back (see #4104)
Ryan C. Gordon 8527c583 2021-04-27T01:36:23 cocoa: Fix recreated windows that are both borderless and resizable. These would accidentally get a titlebar because the "borderless" style mask is zero but the resizable attribute adds a bit. I assume this happens because you used to need window decoration to resize a window in macOS, but this changed in later releases. This only caused problems when recreating a window (you had an SDL_WINDOW_OPENGL window and tried to create a Metal SDL_Renderer on it, etc). Fixes #4324.
Ethan Lee 40210f89 2021-04-26T15:54:14 winrt: Always use a thread for joystick support
Ryan C. Gordon 2fdbae22 2021-04-26T18:43:28 cocoa: Remove mouse event tap. It doesn't appear to work anymore, and was disabled by default anyhow, since the needed APIs are forbidden on the Mac App Store. A better solution to lock the mouse to the window on macOS would still be welcome. CGAssociateMouseAndMouseCursorPosition() works fine for relative mouse mode, this was just a question of SDL_SetWindowGrab(). As it stands now, a grabbed mouse can briefly break out of the window, causing varying degrees of chaos.
Sylvain 9727655b 2021-04-26T14:22:19 SDL_test_common: add other window flags: --shown, --hidden, --input-focus, --mouse-focus
Sylvain d62ebec2 2021-04-26T14:10:39 SDL_test_common: replace 'resize' by 'resizable'
Ryan C. Gordon 1f482174 2021-04-25T12:44:35 x11: Mark backing_store as NotUseful when creating windows. This can give some performance boost, and save some resources, as there's no reason to keep a copy of an SDL window's contents on the server: most SDL apps are redrawing completely every frame, and the API allows for expose events to tell an app a redraw is needed anyhow. (And compositors are free to ignore this setting if it makes sense to do so, according to the Xlib docs.) Reference Issue #3776.
Ryan C. Gordon 9c063468 2021-04-24T19:47:10 x11: call XSync before XSetInputFocus during SDL_ShowWindow. This only happens when using a non-NET_WM window manager, as we might try to set the focus before the window is mapped. Fixes #3949.
Ozkan Sezer 89a2980a 2021-04-23T01:56:10 CMake: fixes to pthreads detection. changes unnecessary check_c_source_runs to check_c_source_compiles, removes the reduntant cross-compile check, and defines _GNU_SOURCE for PTHREAD_MUTEX_RECURSIVE checks just like the autotools version. Fixes: https://github.com/libsdl-org/SDL/issues/4262 Closes: https://github.com/libsdl-org/SDL/pull/4282
Ivan Epifanov ca969eb2 2021-04-24T10:29:52 Remove gles2 vita render
Ivan Epifanov 058bbe02 2021-04-24T10:17:03 Set volume on device open
Ivan Epifanov e3ea5b64 2021-04-24T10:16:21 Migrate to lightweight mutexes
Steven Noonan f1ad942a 2021-04-22T17:24:05 SDL_windows_main: use HeapAlloc/HeapFree for command line arguments If a developer uses SDL_SetMemoryFunctions, we can't rely on SDL_free() working when SDL_main() returns. Signed-off-by: Steven Noonan <steven@valvesoftware.com> Signed-off-by: Sam Lantinga <slouken@libsdl.org>
Steven Noonan 17d8479d 2021-04-22T15:44:01 hidapi/libusb: maintain in-memory cache of vendor/product strings The get_usb_string call is rather expensive on some USB devices, so we cache the vendor/product strings for future lookups (e.g. when hid_enumerate is invoked again later). This way, we only need to ask libusb for strings for devices we haven't seen since before we started. Signed-off-by: Steven Noonan <steven@valvesoftware.com> Signed-off-by: Sam Lantinga <slouken@libsdl.org>
Steven Noonan 4535d654 2021-04-22T14:35:59 HIDAPI_UpdateDiscovery: only treat "add" and "remove" events as relevant I have a buggy system which reports a udev "change" event for an empty USB-C port every 0.14 seconds, which causes annoying frame hitches because SDL decides that means it needs to do a libusb hid_enumerate, which is slow (~25ms!) because of the get_usb_string() calls in there. We only need to re-enumerate if we've seen a device added or removed, so let's filter out the change event first. Signed-off-by: Steven Noonan <steven@valvesoftware.com> Signed-off-by: Sam Lantinga <slouken@libsdl.org>
Steven Noonan b15bbd4e 2021-04-22T16:11:13 SDL_udev: check for NULL return value from udev_device_get_action Signed-off-by: Steven Noonan <steven@valvesoftware.com> Signed-off-by: Sam Lantinga <slouken@libsdl.org>
Sylvain cf05a5eb 2021-04-22T21:40:57 eglChooseConfig: only add EGL_DEPTH_SIZE if non 0 and fix static / shadowed variables warnings for dump configs
Sylvain 98a966d1 2021-04-22T18:06:17 Android: don't need to set the SurfaceHolder format from java code It's already set with ANativeWindow_setGeometry, and eventually set/changed also by eglCreateWindowSurface. - avoid issues with older device where SurfaceView cycle create/changed/destroy appears broken: calling create/changed/changed, and leading to "deuqueBuffer failed at server side, error: -19", with black screen. - re-read the format after egl window surface is created, to report the correct one (sometimes, changed from RGBA8888 to RGB24)
Ethan Lee 8e3ec34d 2021-04-20T12:40:40 wayland: Refactor toplevel mapping, implement HideWindow
Cacodemon345 0838f53d 2021-04-21T11:41:08 Implement SDL_SetWindowAlwaysOnTop for X11
Mathieu Eyraud a5825576 2021-04-21T13:39:31 Fix error handling of wayland message box Zenity return a small integer on success which may be the same as EXIT_FAILURE. Use a bigger integer for error reporting from child process.
Mathieu Eyraud 12dd412b 2021-04-21T13:31:15 Fix icon of wayland message box Also add some comments and silence a warning. Co-authored-by: Ethan Lee <flibitijibibo@gmail.com>
meyraud705 d0cf3b75 2021-04-20T18:26:02 Return correct button id
meyraud705 1fd95c53 2021-04-20T18:15:09 Disable pango markup in wayland massage box Zenity support pango markup, add --no-markup to disable it.
meyraud705 0cd0e9ba 2021-04-20T17:49:21 Reimplement wayland message box function with execvp. Previous version used 'popen' which required to sanitize user provided text. Not sanitizing text could cause failure if user provided text included a " or command injection with `cmd`.
Cacodemon345 99ef03b9 2021-04-21T01:22:22 KMSDRM: Only use OpenBSD-specific defines on pre-6.9 releases
Joseph Lyncheski a0a5da5d 2021-04-19T07:13:38 Add SDL_SetWindowAlwaysOnTop()
Sylvain 6be9c009 2021-04-20T13:46:25 Android: prevent error EGL_BAD_DISPLAY while getting egl version without display There is an error "E libEGL : validate_display:91 error 3008 (EGL_BAD_DISPLAY)" that occurs when calling "eglQueryString(display, EGL_VERSION)", with EGL_NO_DISPLAY. Khronos says "EGL_BAD_DISPLAY is generated if display is not an EGL display connection, unless display is EGL_NO_DISPLAY and name is EGL_EXTENSIONS." but this was added in SDL with "EGL 1.5 allows querying for client version" ( https://github.com/libsdl-org/SDL/commit/56363ebf6124b345e1cfbd14fb6c0e654837910c ) In fact: - it actually doesn't work on Android that has 1.5 egl client - it works on desktop X11 (using SDL_VIDEO_X11_FORCE_EGL=1) The commit moves the version call where it's used, eg inside the "if (platform) {" and checks that "eglGetPlatformDisplay" has been correctly loaded.
Ryan C. Gordon 03503423 2021-04-19T23:31:23 filesystem: Better OpenBSD support for SDL_GetBasePath(). Fixes #3752.
ReNoM de6d2902 2021-04-19T21:48:11 Fix keymap updating for X11 backend
Ethan Lee 509228c4 2021-04-18T22:26:27 wayland: Implement GetDisplayDPI
Ethan Lee fcbfe33c 2021-04-18T09:45:22 wayland: Implement SetWindowModalFor
Ethan Lee 213bfc19 2021-04-18T09:36:54 wayland: Implement RestoreWindow for xdg/zxdg
Ethan Lee 0f518002 2021-04-18T09:33:57 wayland: Removed unused GetDisplayModes/SetDisplayMode functions
Ethan Lee 46df195b 2021-04-18T09:33:06 wayland: Implement GetDisplayBounds
Ethan Lee ed24c345 2021-04-16T21:35:50 wayland: Implement basic window move events via wl_surface_listener. This unearthed an unspeakably large amount of bugs in the wl_output enumerator, notably the fact that the wl_output user pointer was to temporary memory! This was "fixed" in e862856, and was then pointed out as a leak in 4183211, which was undone in d9ba204. The busted fix was correct that the malloc was an issue, but wrong about _why_; SDL_AddVideoDisplay copies by value and does not reuse the pointer, so generally you want your VideoDisplay to be on the stack, but of course the callbacks don't allow that, so a malloc was a workaround. But we can do better and just host our temporary display inside WaylandOutputData because that will be persistent while also not leaking. Wait, wasn't I talking about move events? Right, that: wl_surface_listener does at least give us the ability to know what monitor we're on, even though we have no idea where we are on the monitor. All we need to do is check the wl_output against the display list and then push a move event that both indicates the correct display while also not being _too_ much of a lie (but enough of a lie to where our event doesn't get discarded as "undefined" or whatever). The index check for the video display is what spawned the great nightmare you see before you; aside from the bugfix this is actually a really basic patch.
Sylvain 859230ec 2021-04-16T13:04:36 Android: add AAudio entry in CMake SDL_config
Sylvain d4e96e11 2021-04-16T09:44:07 Android: enable audio driver OpenSLES when building with CMake
Sylvain b4f89c56 2021-04-15T21:16:10 AAudio: add aaudio pause/resume function to android events loop
Sylvain 02b1ebc9 2021-04-15T21:13:17 Android: add openslES and AAudio compilation to CMakeLists
Sylvain 146656cf 2021-04-15T21:03:10 AAudio: add compilation to Android.mk, but not activated in SDL_config_android.h
Sylvain f1fab24e 2021-04-15T21:00:00 AAudio: add bootstrap in SDL_audio.c
Sylvain 04b2f5f6 2021-04-15T20:54:58 Android: add AAudio back-end, with playback and capture (see #3710) https://developer.android.com/ndk/guides/audio/aaudio/aaudio
Sylvain 4118fe62 2021-04-15T20:52:43 Android: OpenSLES, explicitly initialise the global variable 'bqPlayerPlay', it may be read even if OpenSLES back-end hasn't been intialized
Ozkan Sezer babd79b8 2021-04-14T23:20:40 bump minimum required autoconf version and revise autogen.sh
Ozkan Sezer 69203851 2021-04-14T21:40:50 rename PKG_CONFIG_LIBS_PRIV to PKGCONFIG_LIBS_PRIV i.e.: do not steal PKG_CONFIG namespace.
Ozkan Sezer 197cfcaf 2021-04-14T21:10:40 ran configure.ac through autoupdate-2.69 generated configure script is practically the same except for whitespace changes.
Sam Lantinga 499d31e9 2021-04-13T17:00:24 Cleanup Linux joystick code
Luis Cáceres 5c78df9c 2021-04-14T00:56:50 Support key composing (i.e. dead keys) in Wayland driver (#4296) Based on an old patch by chw from the old Bugzilla issue tracker. Authored-by: chw Co-authored-by: Sam Lantinga <slouken@libsdl.org>
Sam Lantinga b04136e7 2021-04-13T16:29:48 Fixed Xbox controller when using the default Linux gamepad mapping Tested with the Xbox Series X controller and the xow driver
Sam Lantinga 1aaafc2b 2021-04-13T16:29:46 Show the real name of the Xbox controller when using the generic mapping on Linux
Paul Cercueil 1542300a 2021-03-24T22:37:08 joystick: linux: Avoid checking for gamepad mapping each frame The information whether a specific joystick can be used as a gamepad is not going to change every frame, so we can cache the result into a variable. This dramatically reduces the performance impact of SDL2 on small embedded devices, since the code path that is now avoided was quite heavy. Fixes #4229. Signed-off-by: Paul Cercueil <paul@crapouillou.net>
okuoku 401f4854 2021-04-11T19:29:01 cmake: Weak link with CoreHaptics Add link to CoreHaptics so we can compile against latest iOS SDKs.
Kyle Schaefer dbedaece 2021-04-11T15:10:28 Adding checks to see if any ASAN flags are set, if so then we set(HAVE_ASAN ON) so the infomartion output will properly list ASAN as on.
Kyle Schaefer 70bd205b 2021-04-11T15:08:14 Adding messages to output CMAKE_C_FLAGS_DEBUG and CMAKE_CXX_FLAGS_DEBUG, this way when using Debug builds you can see which debug flags are set
Kyle Schaefer 32066604 2021-04-11T15:05:58 Moving ASAN macros and calls to macros above the information output section so we can display ASAN information properly.
Ethan Lee f88d91d5 2021-04-12T23:47:23 wayland: Minor whitespace fix
Ethan Lee d785dab5 2021-04-12T23:37:53 wayland: Add unscaled resolutions to the display mode list
Cacodemon345 b0178fe5 2021-04-14T00:52:53 KMSDRM: Report correct window position to the application
Ethan Lee dfcd5fbc 2021-04-08T21:57:58 wayland: Set the keymap in keyboard_handle_modifiers
Sylvain e87c7940 2021-04-13T14:42:38 Fixed bug 3829 - Don't FOURCC format for target textures FOURCC isn't supported by renderer back-ends for target access So use a correct format and fallback to with native/yuv path
Sam Lantinga 9ef0b97c 2021-04-12T11:25:44 Changes to macOS event handler to better interact with the running app - Only focus a new window when one closes if the window that was closed was an SDL window - If the application already has a key window set that is not an SDL window, don't replace it when the application is activated - Only register the URL event handler when SDLAppDelegate is going to be set as the applications app delegate. This is to be consistent with previous behavior that would only register the handler in -[SDLAppDelegate applicationDidFinishLaunching:] and allows the running app to opt out of the behavior by setting its own app delegate. - The URL event handler is now removed if it was set on SDLAppDelegate dealloc
Sam Lantinga 2a20cc0f 2021-04-12T11:25:42 SDL: let through a SetLED command every 5sec to deall with situations where the controller loses power when a computer is suspended CR: SamL
Ethan Lee c59d4dcd 2021-04-08T15:32:33 wayland: Dramatically lower the timeout when reading/writing pipes
Ethan Lee cf124963 2021-04-08T15:29:54 wayland: Fall back to clipboard source data if offer came up empty
Ethan Lee 282c0524 2021-04-08T14:59:04 wayland: Another strlen->SDL_strlen
Ethan Lee bec133d7 2021-04-08T14:16:32 wayland: Use SDL_strlen instead of strlen
Ethan Lee e28d9785 2021-04-08T14:16:21 wayland: Minor whitespace cleanup in clipboard.c
Ethan Lee 875f839d 2021-04-08T14:14:46 wayland: A bunch of clipboard safety fixes. Also removed Wayland_get_data_device because it was a pointless getter function.
Ethan Lee 7510245a 2021-04-08T14:08:35 wayland: Create the data_device only after both device_manager and input exist. There is no guarantee on what order the Wayland interfaces will come in, but the callbacks were assuming that wl_data_device_manager would could before wl_seat. This would cause certain desktops to not have any data_device to work with, meaning certain features like the clipboard would silently no-op.
okuoku 732cc8ed 2021-04-08T21:28:45 cmake: Fix UWP DLL build by removing /NODEFAUTLIB On UWP, we need default C runtime for C++ sources.
Vladislav Dmitrievich Turbanov 50db4a59 2021-04-02T12:05:45 * Support for intrinsics in MSW + Clang scenario. Utility polyfill is provided, removed the no-longer-needed conditionals.
Dean Herbert 89b62093 2021-04-01T14:17:53 Fix race condition that can lead to ENTER/LEAVE window events never firing On windows, when toggling the state of RelativeMode rapidly, there is a high chance that SDL_WINDOWEVENT_ENTER / SDL_WINDOWEVENT_LEAVE events will stop firing indefinitely. This aims to resolve that shortcoming by ensuring mouse focus state is correctly updated via WM_MOUSELEAVE events arriving via the windows event hook.
Philippe Coval 4cee1012 2021-02-03T15:48:17 debian: Align to debian packaging scheme This will prevent files conflicts among packages Change-Id: I32d1ec83229aa635d9198a0ab14a9d6708f24d37 Signed-off-by: Philippe Coval <rzr@users.sf.net>
David Edmundson 6fd37194 2021-04-07T16:03:41 wayland: Fix leaked zxdg_decoration_manager
David Edmundson f6a09ef1 2021-04-07T16:16:23 wayland: Drop support for kwin specific decoration management KWin has supported the shared and formalised zxdg_decoration since Plasma 5.16 which came out mid 2019. Whilst it made sense to support them both for a while, it should not be needed for future SDL releases.
Ethan Lee a92cca1a 2021-04-07T16:44:10 wayland: Use the window's display to get wl_output rather than fullscreen_mode. Because Wayland only supports FULLSCREEN_DESKTOP, fullscreen_mode never gets assigned at all, meaning driverdata is always NULL! Depending on what the compositor does this can lead to dramatically different results. GNOME was fine without this, but Plasma would trip an event that unintentionally unset the fullscreen mode and caused the game to fire a configure event _every frame_, and of course the configure would send the fullscreen_mode output which was still empty. The fix is to just use the SDL_VideoDisplay directly, which will always have a valid wl_output.
Ethan Lee c7e29a9e 2021-04-06T18:10:40 wayland: Fix toggling fullscreen with fixed-size windows
Ryan C. Gordon 0f4aba7b 2021-04-06T18:34:53 audio: Fixed assertion failure if trying to use dummy backend.
Ryan C. Gordon 64853b73 2021-04-06T18:34:17 audio: Changed a disk and dummy backends to use _this instead of this.
Ozkan Sezer e97cfe4a 2021-04-06T23:56:10 KMSDRM_Vulkan_CreateSurface(): fixed pointer-cast warning on 32 bit Closes: https://github.com/libsdl-org/SDL/issues/4284
Philippe Coval 78095e37 2021-04-03T15:28:09 git: Ignore debian generated files Signed-off-by: Philippe Coval <rzr@users.sf.net> Change-Id: Iebfef58f41056c01736aba99f38fdedb9ee93013
Philippe Coval 17ceddf2 2021-04-03T21:27:13 debian: Align debian deps This will enable more flexibility in configuration I am using this for snapshot built with GLES1 enabled Relate-to: https://github.com/adoptware/pinball/issues/22 Signed-off-by: Philippe Coval <rzr@users.sf.net> Change-Id: I4387663605475ddd669694a7828f101881e424b8
Ryan C. Gordon ebc11098 2021-04-04T12:29:18 Removed mkdocs.yml More GitHub Actions nonsense.
okuoku 7b8c7509 2021-04-03T22:21:35 CMake: Enable WASAPI on WinRT WASAPI backend on WinRT was implemented with 2.0.8 https://github.com/libsdl-org/SDL/commit/351d6d478443fe8a1ede1e993712f07cb369d483 but CMake source here was written for 2.0.7 in vcpkg https://github.com/microsoft/vcpkg/commit/e6c65b93b125cf0be13254cf2f5a9d27cb009707
okuoku 8fa2ce56 2021-04-03T22:47:47 WinRT: Rename Interface ID symbols Rename locally-defined Interface ID symbols to avoid conflict with locally linked dxgi library. Prefixed with `SDL_` to match with other references in render_d3d11 or wasapi.
Nicholas "LB" Braden 3dbc4cf2 2021-03-30T17:49:51 Fix compilation error for Windows SDK 8.1+ https://docs.microsoft.com/en-us/windows/win32/api/shellscalingapi/ne-shellscalingapi-monitor_dpi_type
Philippe Coval 9634070b 2021-04-03T15:04:12 debian: Update README file in doc package Signed-off-by: Philippe Coval <rzr@users.sf.net> Change-Id: I7cd02e3094cb60328a24702afecb13f61beb67a1
meyraud705 413a2306 2021-04-04T10:47:06 NULL passed to strcmp in Wayland_ShowMessageBox
Ozkan Sezer 573c5a5b 2021-04-04T11:55:50 regenerated configure.
Ryan C. Gordon 49141996 2021-04-04T00:29:26 ibus: make sure we don't pass a NULL path string over D-Bus. Fixes #2941.
Ryan C. Gordon e0068723 2021-04-04T00:23:52 hints: SDL_HINT_TIMER_RESOLUTION applies to all versions of Windows. Fixes #3654.
Ryan C. Gordon a81fe272 2021-04-04T00:16:30 configure/cmake: Hook up Emscripten threads (disabled by default). Fixes #3795.
Ryan C. Gordon 354cabd4 2021-04-03T18:15:50 egl: favor truecolor configurations. If app requested <= 16 color depth and there is a 24-bit config available, favor that. This fixes things that quietly expect to get truecolor output but don't request it (...like SDL's render api...) and things that are probably requesting 16-bit color as a fallback but expecting reasonable systems to give them full depth. Specifically, this fixes Life is Strange on Wayland, which uses the latter approach, and anything using SDL_Render on Wayland, which uses the former. Fixes #4056. Fixes #4132.
Ryan C. Gordon 95e5f058 2021-04-03T13:24:10 audio: make SDL_OpenAudioDevice declaration look less squashed.
Ryan C. Gordon 4abe3446 2021-04-03T10:10:58 SDL_EGL_ChooseConfig: cleanups and minor optimizations. - Move an immutable condition out of a for loop. - Add a break statement to that loop when we find what we're looking for. - Add an assert to make sure we don't overflow a buffer. - Wrap a single-statement if block in braces. - Adjust some whitespace.
Ryan C. Gordon 7d02248c 2021-04-02T14:36:53 tls: wrap reference to a mutex into an #if !SDL_THREADS_DISABLED test.