Commit Graph

6654 Commits (d0b87fede62f2b16bd80eaa76f7ae7924330914a)

Author SHA1 Message Date
Sylvain Becker c005267fb1 SDL_BlitScaled: better and safer fix clipping bug #2687
And re-use SDL_round(), since it's been re-added
(remove in https://hg.libsdl.org/SDL/rev/34043108b7e4 )
2021-01-02 09:38:19 +01:00
Sylvain Becker 2127ed2574 SDL_SoftStretch: add a check for input pixel format
and function re-naming
2021-01-02 09:28:16 +01:00
Ozkan Sezer b5f0483cb3 fix permissions 2021-01-01 22:30:28 +03:00
Sam Lantinga ab55ec4850 Fix use-after-free SBH corruption due to overlapped ReadFile in hidapi not being canceled for all threads before device close
- hidapi already called CancelIo on hid_close but that only cancels pending IO for the current thread. Controller read/writes originate from multiple
  threads (serialized, but on a different thread nonetheless) but device destruction was always done on the main device thread which left any
  pending overlapped reads still running after hidapi's internal read buffer is deallocated leading to intermittent free list corruption.
2021-01-01 11:12:41 -08:00
Sam Lantinga 480c1f9fef Make sure we're not starving report reads when there's lots of rumble 2021-01-01 11:12:36 -08:00
Sam Lantinga 223af86c62 Added SDL_RenderGetD3D11Device() to get access to the device associated with the D3D11 renderer 2021-01-01 11:12:30 -08:00
Sam Lantinga 5f0b2a7f54 Fixed resource leak with D3D11 NV12 textures 2021-01-01 11:12:22 -08:00
Manuel Alfayate Corchete 21003b7db2 [KMS/DRM] Small refactoring on the SwapWindow function. 2020-12-31 14:31:29 +01:00
Manuel Alfayate Corchete e1fb969b76 [KMS/DRM] Correct comments about last bugfix. 2020-12-31 01:40:15 +01:00
Manuel Alfayate Corchete e34caa9779 [KMS/DRM] Correct EGL/GL library loading on window creation, thus saving window re-creation. 2020-12-31 01:31:57 +01:00
Sylvain Becker d81fe9239f SDL_BlitScaled: remove un needed -1 +1 offset in calculation 2020-12-30 22:03:32 +01:00
Ozkan Sezer 8476df3e31 SDL_mixer.c: remove calls to non-existing m68k asm code. 2020-12-30 23:55:10 +03:00
Ozkan Sezer 5b2e011e6d SDL_endian.h: minor fixes from SDL-1.2 branch
( forward-port of changesets 3909:6832b00d3594 and 5657:529d23724144 )
2020-12-30 23:55:02 +03:00
Sam Lantinga 5aba082703 Build SDL for Mac hardware when targeting iOS 2020-12-30 11:38:51 -08:00
Sylvain Becker 590a5469ed Fixed bug 5424 - Renderer doesn't use entirely the viewport when scaling is used
Viewport/Clip dimensions are calculated usingg SDL_ceil whereas all renders use SDL_floor
2020-12-30 16:12:14 +01:00
Ozkan Sezer a88071deb5 configure.ac: directfb dynamic loading support updates:
put back sed on find_lib result, remove debug messages,
fix directfb_lib report to user.
2020-12-30 15:55:00 +03:00
Ozkan Sezer f24cc903a2 remove CFLAGS save/restores from dbus.h and ibus.h header checks.
CPPFLAGS is what AC_CHECK_HEADER needs.
2020-12-30 15:53:56 +03:00
Ozkan Sezer 88eaf356a7 minor update to test/acinclude.m4 (pkg.m4) 2020-12-30 15:53:20 +03:00
Ozkan Sezer 92edee2324 SDL_config_android.h: update SIZEOF_VOIDP define to respect __LP64__ 2020-12-30 01:28:02 +03:00
Ozkan Sezer 7c105f12d5 updates to SDL_config_os2.h 2020-12-30 01:21:10 +03:00
Ozkan Sezer 1cdc1d4890 SDL_config.h.cmake, SDL_config.h.in: update for SIZEOF_VOIDP define 2020-12-30 01:00:24 +03:00
Ozkan Sezer 9fc139dfb5 SDL_config_windows.h: add missing HAVE_STRTOULL along side HAVE_STRTOLL 2020-12-30 01:00:24 +03:00
Ozkan Sezer b76b81b0e4 SDL_config.h.cmake, SDL_config.h.in: add os/2 driver defines
in case autofoo or cmake is used for it some day..
2020-12-30 01:00:24 +03:00
Ozkan Sezer 8a32ee24db removed MSVC strtok_s use from SDL_strtokr().
no other ??_s are used elsewhere in SDL_stdinc. besides, C11 has a
strtok_s with a different signature.
2020-12-30 01:00:24 +03:00
Sam Lantinga 0684572ccc Added a hint to control whether the player LEDs should be lit to indicate which player is associated with a PS5 controller. 2020-12-29 12:13:10 -08:00
Ozkan Sezer 6116ccf035 fix configure warnings when checking dbus/dbus.h and ibus-1.0/ibus.h
.. by adding DBUS_CFLAGS and IBUS_CFLAGS to CPPFLAGS:

configure: WARNING: dbus/dbus.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: dbus/dbus.h: proceeding with the compiler's result
configure: WARNING: ibus-1.0/ibus.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: ibus-1.0/ibus.h: proceeding with the compiler's result
2020-12-29 21:20:28 +03:00
Ozkan Sezer f175824172 config.sub, config.guess: go back to backtick `..` substitutions.
see e.g. https://lists.gnu.org/archive/html/config-patches/2020-12/msg00000.html
2020-12-29 20:51:10 +03:00
Sylvain Becker 80cf8a8b76 SDL_BlitScaled: also prevent crash if dest width or height is negative 2020-12-29 17:29:31 +01:00
Sylvain Becker f08b9a5b6b SDL_BlitScaled: prevent crash if dest width or height is 0 2020-12-29 16:02:52 +01:00
Manuel Alfayate Corchete 427c96ec11 [KMS/DRM] Rework some functions. 2020-12-29 14:24:38 +01:00
Sam Lantinga 67f0b9b86d Fixed bug 5418 - Add system features detection for Elbrus (E2K)
Ivan Kuzmenko

MCST Elbrus 2000 (E2K, https://en.wikipedia.org/wiki/Elbrus_2000) is a russian processor architecture based on VLIW/EPIC instruction set (like Intel Itanium (IA-64) architecture). Architecture has half native / half software support of most Intel/AMD SIMD (e.g. MMX/SSE/SSE2/SSE3/SSSE3/SSE4.1/SSE4.2/AES/AVX/AVX2 & 3DNow!/SSE4a/XOP/FMA4).
It also has built-in x86/x86_64 <-> e2k binary translators  (RTC, http://www.mcst.ru/rtc and Lintel, http://www.mcst.ru/lintel) that can run code for x86/x86_64 architecture (Transmeta did something similiar with their Crusoe series) with SIMD extensions support.
Attached patch allows SDL2 to detect extensions supported by E2K like MMX, 3dNOW!, AVX etc. (test/testplatform log: https://termbin.com/7qs3).
2020-12-28 20:58:47 -08:00
Ozkan Sezer 8eae956c98 regenerated configure 2020-12-29 00:00:56 +03:00
Sam Lantinga 3cb0e840e6 Fixed bug 5422 - KMSDRM_LEGACY: Add OpenBSD support
wahil1976

This patch adds support for OpenBSD to KMSDRM_LEGACY. Note that the patch won't be ported to the atomic KMSDRM backend because OpenBSD does not support atomic KMS properly yet.
2020-12-28 11:47:53 -08:00
Joel Linn 8fc0baad98 Add SDL_cond implementation using Windows Condition Variables
Is automatically used when the SRW SDL_mutex implementation is active.
Otherwise falls back to the generic implementation.

v2: - Rebase onto master fa3ea1051a4b
2020-12-28 11:43:11 -08:00
Joel Linn 2443e51e0e Add optional suffix `_generic` to generic SDL_cond impl
Allows for runtime selectable implementation
2020-12-28 11:42:49 -08:00
Manuel Alfayate Corchete 7539ac8087 [KMS/DRM] Restore hacky code to point to TTY buffer on surface destruction b/c I lack alternatives. 2020-12-28 18:22:07 +01:00
Sylvain Becker 5dabc4d72f Revert changeset 14590 544ac819e8b3 , does not fully fix 2020-12-28 18:17:25 +01:00
Sylvain Becker 9efdafd43d SDL_RenderCopy: scale before doing intersection
this prevents drawing 1 pixel outside the screen, in letterbox mode
2020-12-28 18:07:03 +01:00
Manuel Alfayate Corchete 86b81abea6 [KMS/DRM_LEGACY] Prevent mouse cursor from staying onscreen after window destruction. Patch by Ozkan Sezer. 2020-12-28 16:19:19 +01:00
Manuel Alfayate Corchete 0feaf7d196 [KMS/DRM][Vulkan] Correct non-existing property. Remove hacky surface destruction code (TTY buffer isn't there after a Vulkan window is created). 2020-12-28 14:37:58 +01:00
Sylvain Becker 7186584b8d fix indentation (bug 5313) 2020-12-28 10:41:37 +01:00
Ozkan Sezer 9e22f62e0d arm64 implementations of SDL_Swap16/32 (bug #5419.)
patch from David Carlier.
2020-12-28 11:50:02 +03:00
Ozkan Sezer 2355dea448 revert 'arm64 implementations of SDL_Swap16/32' for now (bug #5419) 2020-12-28 08:00:50 +03:00
Ozkan Sezer 2f99bc07e7 arm64 implementations of SDL_Swap16/32 (bug #5419.)
patch from David Carlier.
2020-12-28 07:20:20 +03:00
Sylvain Becker c2735c0bb9 Better scaling fallbacks for the SW renderer (bug 5313) 2020-12-27 23:53:28 +01:00
Ozkan Sezer a6beb2d264 SDL_PrivateLowerBlitScaled: remove unused local var 'a' 2020-12-28 01:10:02 +03:00
Sylvain Becker 30df2e4e36 Scaling fallbacks for the SW renderer (bug 5313) 2020-12-27 23:00:11 +01:00
Luca Weiss 040bd7a91b Fix udev not detecting ID_INPUT_KEY devices when udev is not running
https://bugzilla.libsdl.org/show_bug.cgi?id=5308

The udev code labels devices that are found by this code with
ID_INPUT_KEY which in turn gets used by SDL to label the devices as
SDL_UDEV_DEVICE_KEYBOARD.

This was missing for the code path when udev is not running and as such
devices such as the power button of a phone was not detected as keyboard
input and no devices were emitted.
2020-12-28 00:55:28 +03:00
Sylvain Becker f9b5f6cc0f Forward scale mode to SW renderer (Bug 5313) 2020-12-27 20:28:24 +01:00
Ozkan Sezer 471d3c363e fix bug #5415 -- fatal error: 'Cocoa/Cocoa.h' file not found in iOS build 2020-12-27 14:00:30 +03:00