Commit Graph

6805 Commits

Author SHA1 Message Date
Ryan C. Gordon 65fbf36c9e Cleaned up a few more Bugzilla mentions. 2021-02-12 14:46:49 -05:00
Ryan C. Gordon 60a99b0b59 BUGS.txt now points to GitHub Issues instead of bugzilla.libsdl.org. 2021-02-12 14:41:11 -05:00
Ryan C. Gordon 4ff51d29c3 Deprecate SDL_GetRevisionNumber and update things for git instead of hg.
Fixes #4063
2021-02-12 14:31:38 -05:00
Sam Lantinga ee25a1e6e2 The revision defaults to the empty string 2021-02-12 08:54:08 -08:00
Sam Lantinga 9deffcd325 Updated the revision header with git revision 2021-02-12 08:50:16 -08:00
soredake 39153f81b9 add Linux mapping for Ipega PG-9087S, closes #3783 2021-02-12 08:00:41 -08:00
Jay Petacat f443a6fc7a Fix format string warnings for width-based integers
The DJGPP compiler emits many warnings for conflicts between print
format specifiers and argument types. To fix the warnings, I added
`SDL_PRIx32` macros for use with `Sint32` and `Uint32` types. The macros
alias those found in <inttypes.h> or fallback to a reasonable default.

As an alternative, print arguments could be cast to plain old integers.
I opted slightly for the current solution as it felt more technically correct,
despite making the format strings more verbose.
2021-02-11 19:41:41 -08:00
Sam Lantinga 5427f4861b Added support for trigger rumble for all Microsoft Xbox One controllers 2021-02-11 17:28:07 -08:00
Sam Lantinga 1f7ec3fa4e Added support for the PowerA Xbox One Series X Wired Controller 2021-02-11 17:27:22 -08:00
Ryan C. Gordon f9046b4cab We're in Git now! Updated docs. 2021-02-11 14:39:08 -08:00
Ethan Lee cad67082f3 wayland: Check for both _WAYLAND_CLIENT_H and WAYLAND_CLIENT_H 2021-02-11 14:27:08 -08:00
Vladislav Dmitrievich Turbanov 31e8a4627a * Fixed closing the test window. 2021-02-11 14:20:01 -08:00
Sam Lantinga ef52560a24 Fixed bug 5539 - Clang 11 fails to compile a CMake build with conflicting types for _m_prefetchw
vladius

In SDL_cpuinfo.h it seems like <intrin.h> is not included when __clang__ is defined, as the comment in the file explicitly reads:
"Many of the intrinsics SDL uses are not implemented by clang with Visual Studio"

However, the SDL_endian.h header does include <intrin.h> without any precautions like:
>#ifdef _MSC_VER
>#include <intrin.h>
>#endif

Maybe it should be changed to something like:
>#ifdef _MSC_VER
>#ifndef __clang__
>#include <intrin.h>
>#endif
>#endif
2021-02-10 10:22:20 -05:00
Sam Lantinga 629334f283 Fixed bug 5543 - Wayland: Fix waylandvideo.h warnings
wahil1976

This patch fixes the warnings seen when compiling the Wayland backend. This will also be required in the future to avoid issues with compilation.
2021-02-10 10:22:20 -05:00
Cameron Gutman f70e197363 Fix waiting on condition variables with the SRW lock implmentation
When SleepConditionVariableSRW() releases the SRW lock internally, it causes
our SDL_mutex_srw state to become inconsistent. The lock is unowned yet inside,
the owner is still the sleeping thread and more importantly the owner count is
still 1.

The next time someone acquires the lock, they will bump the owner count from 1
to 2. At that point, the lock is hosed. From the internal lock state, it looks
to us like that owner has acquired the lock recursively, even though they have
not. When they call SDL_UnlockMutex(), it will see the owner count > 0 and not
call ReleaseSRWLockExclusive().

Now when someone calls SDL_CondSignal(), SleepConditionVariableSRW() will start
the wakeup process by attempting to re-acquire the SRW lock. This will deadlock
because the lock was never released after the other thread had used it. The
thread waiting on the condition variable will never be able to wake up, even if
the SDL_CondWaitTimeout() function is used and the timeout expires.
2021-02-10 10:22:20 -05:00
Sam Lantinga d9ba20442e Backed out changeset 852a7bdbdf4b
This causes a use-after-free memory error
2021-02-10 10:22:20 -05:00
Christian Rauch 4183211a54 free the 'display' after it was added to global list 2021-02-10 10:22:20 -05:00
Manuel Alfayate Corchete 005e2c59a7 [KMS/DRM] Bugfix number #5535: Improve reliability, by wahil1976. 2021-02-10 10:22:20 -05:00
Christian Rauch 2170c7bfde make AddressSanitizer optional and disabled by default 2021-02-10 10:22:20 -05:00
Christian Rauch 5045d299a6 enable AddressSanitizer only for GCC 5 onwards (bug #5533) 2021-02-10 10:22:20 -05:00
Christian Rauch 066960c207 add '-shared-libasan' to debug flags (bug #5533) 2021-02-10 10:22:20 -05:00
Ozkan Sezer dc45a228b9 avoid some pedantic warnings in array initializers 2021-02-10 10:22:20 -05:00
Sam Lantinga 9c3aa7f055 SDL: fix packet handling for original version of Stadia FW 2021-02-10 10:22:20 -05:00
Ozkan Sezer bb9e049d1d minor updates to libc function checks 2021-02-10 10:22:19 -05:00
Manuel Alfayate Corchete 19fa85d8af [KMS/DRM] Fix build warning. 2021-02-10 10:22:19 -05:00
Manuel Alfayate Corchete 6ee53258cd [KMS/DRM] Replace indent tabs with spaces, as intended. 2021-02-10 10:22:19 -05:00
Manuel Alfayate Corchete 59cd46c24a [KMS/DRM] Merge patch for bug #5532: No need to correct cursor position now that all windows are fullscreen. Link: https://bugzilla.libsdl.org/show_bug.cgi?id=5519. 2021-02-10 10:22:19 -05:00
Manuel Alfayate Corchete 538f7ad6b7 [KMS/DRM] Remove redundant SDL_SendWindowEvent() call. 2021-02-10 10:22:19 -05:00
Manuel Alfayate Corchete 7beba05013 [KMS/DRM] Restore all-windows-are-fullscreen functionality, since there is no window manager in KMSDRM. 2021-02-10 10:22:19 -05:00
Cameron Gutman f4d58689e0 Fix Xbox Series X controller on macOS
There were two different implementations of IsBluetoothXboxOneController(), one
in SDL_hidapi_xbox360.c and one in SDL_hidapi_xboxone.c. The latter had been
updated to include USB_PRODUCT_XBOX_ONE_SERIES_X_BLUETOOTH while the former had
not.

This mismatch led to the Xbox Series X failing on macOS only. We have special
code for handling the 360Controller driver for macOS which requires us to use
the Xbox 360 driver for wired Xbox One controllers, and the SDL_hidapi_xbox360
version of IsBluetoothXboxOneController() was used to determine which devices
were wired.

In addition to adding the missing USB_PRODUCT_XBOX_ONE_SERIES_X_BLUETOOTH, this
change moves IsBluetoothXboxOneController() into a single shared function which
will ensure this bug won't happen again.
2021-02-10 10:22:19 -05:00
Sam Lantinga 525196dd8b Updated runtime dependency on libudev 2021-02-10 10:22:19 -05:00
Sam Lantinga ff297753db Fixed compiler warning 2021-02-10 10:22:19 -05:00
Sam Lantinga a60af1e4d0 Backed out changeset 1cde3dd0f44d - this breaks windows which are created and then set to FULLSCREEN_DESKTOP 2021-02-10 10:22:19 -05:00
Sylvain Becker d74779b748 Android: documention update 2021-02-10 10:22:19 -05:00
Sam Lantinga e404b525f1 KMSDRM doesn't have a window manager, so all windows are fullscreen 2021-02-10 10:22:19 -05:00
Sylvain Becker 549bc13362 SDL_vulkan_utils: minor code clean-up 2021-02-10 10:22:19 -05:00
Sylvain Becker c0166a29b7 SDL_ConvertColorkeyToAlpha: remove and clarify a FIXME
This function doesn't handle bpp 1 or 3 case, because those formats never have an alpha channel
2021-02-10 10:22:19 -05:00
Sam Lantinga 85235985fb Fixed detecting the paddles on the Xbox Elite Series 1 controller 2021-02-10 10:22:19 -05:00
Sam Lantinga 69e9b2acee Fixed bug 5471 - Creating a fullscreen desktop window goes windowed temporarily
This is caused by the Metal renderer recreating the window because by default we create an OpenGL window on macOS.

It turns out that at least on macOS 10.15, a window that has been initialized for OpenGL can also be used with Metal. So we'll skip recreating the window in that case.
2021-02-10 10:22:19 -05:00
Sam Lantinga ef2f13e125 Added test command line options to force different window types 2021-02-10 10:22:19 -05:00
Sam Lantinga 2426949a18 Removed support for clock_gettime_nsec_np()
SDL_GetTicks() was broken and it's not adding any real value here.
2021-02-10 10:22:19 -05:00
Christian Rauch 42798cec8b cmake: enable AddressSanitizer in Debug builds if supported 2021-02-10 10:22:19 -05:00
Sam Lantinga fadfa51022 Don't uncorrelate while rumble is active and stay correlated longer in case raw input messages are lagging a bit. 2021-02-10 10:22:19 -05:00
Sebastian Krzyszkowiak e862856e6f wayland: Don't crash when the properties of already existing wl_output change 2021-02-10 10:22:18 -05:00
Sam Lantinga cef198c9cb Fixed bug 5524 - Pass NSString to NSLog()
Hiroyuki Iwatsuki

If you pass the C string directly to NSLog(), it will be garbled with Japanese and probably other language strings, or no log will be output at all.

NSLog("Hello, World!"); // => "Hello, World!"
NSLog("こんにちは、世界!"); // => No output...

Therefore, you need to convert the string to an NSString before passing it to NSLog().

NSString *str = [NSString stringWithUTF8String:"こんにちは、世界!"];
NSLog(@"%@", str); // => "こんにちは、世界!"

Thank you.
2021-02-10 10:22:18 -05:00
Sam Lantinga b7f711cd76 Don't enable address sanitize flags without checking compiler first 2021-02-10 10:22:18 -05:00
Christian Rauch 0ed16ceddb free 'outputs' in 'Wayland_DestroyWindow' 2021-02-10 10:22:18 -05:00
Christian Rauch a44678465f free the 'data_device_manager' 2021-02-10 10:22:18 -05:00
Christian Rauch f8b4a6e25a cmake: enable AddressSanitizer in Debug builds 2021-02-10 10:22:18 -05:00
Sebastian Krzyszkowiak 3ae2ec34fa wayland: Fix transform and scale handling when setting display mode 2021-02-10 10:22:18 -05:00