Commit Graph

9862 Commits (5a0c8198634ad1670f8d003e4f7f8a87cc3c6411)

Author SHA1 Message Date
Cameron Gutman 3242265ff1 joystick: Fix endianness issues in Xbox HIDAPI drivers 2022-07-10 10:49:38 -07:00
Ozkan Sezer 2f21648528 SDL_os2video.c: silenced -Wempty-body warning, along with minor tidy-up. 2022-07-08 20:56:40 +03:00
Sam Lantinga 531647efba Regenerated configure with latest autotools release 2022-07-08 09:46:01 -07:00
285424336 4aad594a8b Update SDL_qsa_audio.c
Fix qnx platform compile error, change SDL_Bool to SDL_bool.
2022-07-08 12:15:00 +03:00
Eric Curtin c0eada2019
Fix assumption that DRI_DEVNAME begins at 0 (#5865)
* Fix assumption that DRI_DEVNAME begins at 0

The existing logic of the code was to count every possible entry in
KMSDRM_DRI_PATH. After this a for loop would start trying to open
filename0, filename1, filename2, etc. In recent Linux kernels (say
5.18) with simpledrm, the lowest KMSDRM_DRI_DEVNAME is often
/dev/dri/card1, rather than /dev/dri/card0, causing the code to fail
once /dev/dri/card0 has failed to open. Running:

modprobe foodrm && modprobe bardrm && rmmod foodrm

before you try to run an application with SDL KMSDRM would have also
made this fail.

* Various changes from review

- Removed newline and period from SDL error
- Explicitely compare memcmp to zero (also changed to SDL_memcmp)
- Changed memcpy to strncpy
- Less aggressive line wrapping

* Various changes from review

- strncpy to SDL_strlcpy
- removed size hardcodings for KMSDRM_DRI_PATHSIZE and
  KMSDRM_DRI_DEVNAMESIZE
- made all KMSDRM_DRI defines, run-time variables to reduce bugs caused
  by these defines being more build-time on Linux and more run-rime on
  OpenBSD
- renamed openbsd69orgreater variable to moderndri
- altered comment from "if on OpenBSD" to add difference in 6.9

* Various changes from review

- Use max size of destination, rather than max size of source
- Less hardcodings
2022-07-06 09:00:16 -07:00
Sam Lantinga adf3ce7c01 Don't drop mouse focus on WM_MOUSELEAVE if the mouse is in relative mode; mouse-level is not meaningful for that case.
Do drop mouse focus when keyboard focus is lost if the mouse is in relative mode.
2022-07-05 21:42:24 -07:00
Sam Lantinga 0253a45029 Fix format specifiers for WPARAM/LPARAM values, they are UINT_PTR. 2022-07-05 21:42:20 -07:00
Sam Lantinga f5cbc440e3 Merge commit 'ad0b91302d34336f8af8787fefeeddb553606ec6' into main 2022-07-05 21:41:34 -07:00
Sam Lantinga 001969b324 Merge commit '98411c0d338933e75221cc9c25bf3d5b9ec977b9' into main 2022-07-05 21:41:32 -07:00
Sam Lantinga b76393f1fe Merge commit '6187edd41e318f9c434ba178fb32a8ef2b07e5da' into main 2022-07-05 21:41:30 -07:00
Sam Lantinga d16a7bb9dc Merge commit 'fdb86b8266947e225f058b32ebb77fa949f6ae42' into main 2022-07-05 21:41:28 -07:00
Sam Lantinga c36025322f Merge commit 'b085c18251bc0298b1a78a621025978702ca07f7' into main 2022-07-05 21:41:26 -07:00
Sam Lantinga 8db084d5e7 Merge commit '51f75b8b309992252a1e18643e310f2774dec4ef' into main 2022-07-05 21:41:24 -07:00
Sam Lantinga 21437ad3f8 Merge commit 'fcb99d783090cc15bc04cdebe877ab36a3697e3d' into main 2022-07-05 21:41:22 -07:00
Sam Lantinga 8d7ea151b4 Merge commit '85bbf8eec9f5e422447807b6cabec8c9ec0859d9' into main 2022-07-05 21:41:20 -07:00
Sam Lantinga b0c9139783 Merge commit '643f9e56d03d8be9adf774c4931fe95742225006' into main 2022-07-05 21:41:19 -07:00
Sam Lantinga e09233cd2e Merge commit '7d7c5b803cecdb87673b824103e4c1c0b3e29fac' into main 2022-07-05 21:41:17 -07:00
Sam Lantinga 9221840280 Merge commit '2a25b69ba580ff63ede93f2b19fa1bca09dab484' into main 2022-07-05 21:41:15 -07:00
Sam Lantinga c218b55c67 Merge commit '0a600b1df45558c16812995aa2c03f0b5f636afb' into main 2022-07-05 21:41:13 -07:00
Sam Lantinga 89c393306d Merge commit 'cd79e9c4e25ffd15010953b15ae8cbc25b7e7a90' into main 2022-07-05 21:41:11 -07:00
Sam Lantinga 23ff1c605a Merge commit 'f317d619ccd22e60cebf1b09d716d3985359c981' into main 2022-07-05 21:41:09 -07:00
Sam Lantinga 95405d9625 Merge commit '0025621b8064f5c72561d5d7b7a1fbdde860c236' into main 2022-07-05 21:39:44 -07:00
Sam Lantinga 4615494f9d Merge commit '391dd0d94b625ae9f7edec2b7514a2f6ba9fb670' into main 2022-07-05 21:39:42 -07:00
Sam Lantinga 85d6d83b6c Merge commit '89624485ccffa9e9b9f1743d431034297daaf251' into main 2022-07-05 21:39:40 -07:00
Sam Lantinga a9a79ddfb1 Merge commit 'e9d5060c4c2df66e8d4ef4f748f80e8ef32fc233' into main 2022-07-05 21:39:38 -07:00
Sam Lantinga 91c7329ce1 Merge commit '209f457ea4eed6a2a3816f42049a17101c049d9c' into main 2022-07-05 21:39:36 -07:00
Sam Lantinga acc03716ea Merge commit 'bdbf90e3fc27c123e699c03f54de3e35e51861dc' into main 2022-07-05 21:39:35 -07:00
Sam Lantinga 6d3ce729a6 Merge commit '7ac5d616f3732b4d98010331d2ae0a24f883092d' into main 2022-07-05 21:39:33 -07:00
Sam Lantinga 7ef298f7c7 Merge commit '37a517dc36b7ba8f703c82a408bef6e44e5786ba' into main 2022-07-05 21:39:31 -07:00
Sam Lantinga 6b0e1adfe9 Merge commit '78089e6598240178b62d6720eec041cc698a5e7c' into main 2022-07-05 21:39:29 -07:00
Sam Lantinga fbc9800304 Merge commit '3e114872e842879c048b2a7808f2cdbfeb2228fe' into main 2022-07-05 21:39:27 -07:00
Sam Lantinga d514f24839 Merge commit '4f732197947d39cf13b4e3de1811d9bcace3798c' into main 2022-07-05 21:39:25 -07:00
Sam Lantinga eaeaf55fc2 Merge commit '24251fb5442296b8066ccc7af6cda430bf2017db' into main 2022-07-05 21:39:23 -07:00
Eddy Jansson ad0b91302d android: Add missing entries to SDL_category_prefixes table.
Add static assert so this shouldn't happen in the future.

Fixes #5883
2022-07-05 17:50:19 -07:00
Chris Mumford 98411c0d33 Added include: libkern/OSAtomic.h
When building on macOS without gcc (e.g. clang) where HAVE_GCC_ATOMICS
is not defined, `SDL_AtomicTryLock` will call
`OSAtomicCompareAndSwap32Barrier` which is not yet declared.
Including OSAtomic.h on OSX resolves this error/warning:

    SDL_spinlock.c:125:12: error: implicit declaration of function
      'OSAtomicCompareAndSwap32Barrier' is invalid in
      C99 [-Werror,-Wimplicit-function-declaration]
        return OSAtomicCompareAndSwap32Barrier(0, 1, lock);

This was reported in issue #3885 but marked Invalid and closed - possibly
because the default CMake build uses gcc instead of clang.
2022-07-05 07:50:57 -07:00
SDL Wiki Bot 6187edd41e Sync SDL wiki -> header 2022-07-04 23:57:05 +00:00
Ryan C. Gordon fdb86b8266
x11: Don't try to use XInput2 multitouch if not supported.
Fixes #5889.
2022-07-04 12:48:32 -04:00
rohlem b085c18251 make SDL_SetTextInputRect take a pointer to const
The documentation doesn't state that the argument is ever modified,
and no implementation does so currently.
This is a non-breaking change to guarantee as much to callers.
2022-07-04 09:38:01 -07:00
Dav999-v 51f75b8b30 Fix fallback implementations of SDL_strchr and SDL_strrchr for '\0'
strchr and strrchr return a pointer to the first/last occurrence of a
character in a string, or NULL if the character is not found. According
to the C standard, the final null terminator is part of the string, and
it should thus be possible to get a pointer to the final null with
these functions. The fallback implementations of SDL_strchr and
SDL_strrchr would always return NULL if trying to find '\0', and this
commit fixes that.
2022-07-04 11:10:26 -04:00
SDL Wiki Bot fcb99d7830 Sync SDL wiki -> header 2022-07-04 13:42:05 +00:00
chalonverse 85bbf8eec9 Fixed coment after #endif 2022-07-03 15:22:30 -04:00
Francisco Javier Trujillo Mata 643f9e56d0 Rename folder created in test_filesystem 2022-07-03 09:24:55 -07:00
Francisco Javier Trujillo Mata 7d7c5b803c Improving mkdir creating parents folder 2022-07-03 09:23:34 -07:00
Anthony Heathcoat 2a25b69ba5 Check if GNC is defined before checking its value to solve warns in msvc 2022-07-03 00:56:09 -07:00
Cameron Cawley 0a600b1df4
Merge testguid into testautomation (#5873) 2022-07-01 16:27:51 -07:00
Sam Lantinga cd79e9c4e2 Removed comment text that looks like doxygen commands 2022-07-01 14:04:07 -07:00
chalonverse f317d619cc
Xbox GDKX support (#5869)
* Xbox GDK support (14 squashed commits)

* Added basic keyboard testing

* Update readme

* Code review fixes

* Fixed issue where controller add/removal wasn't working (since the device notification events don't work on Xbox, have to use the joystick thread to poll XInput)
2022-07-01 13:59:14 -07:00
Cameron Cawley 0025621b80 Add a default URL in testurl 2022-07-01 13:54:17 -07:00
Sam Lantinga 391dd0d94b Don't spin as quickly as possible in the checkkeys rendering loop 2022-07-01 13:35:41 -07:00
Sam Lantinga 89624485cc Updated the test bitmap font to cover the Latin-1 character set
Based on Marcel Sondaar's font8_8.asm, in the public domain
2022-07-01 13:32:56 -07:00