Sam Lantinga
aa2e2f4843
Make sure HID devices can be opened before making them available to the application
...
This prevents a number of issues where devices are enumerated but not actually able to be opened, like https://github.com/libsdl-org/SDL/issues/5781 .
We currently leave the devices open, allowing us to more easily do controller feature detection, protocol negotiation, detect dropped Bluetooth connections, etc. with the expectation that the application is likely to open the controllers shortly.
2022-09-22 18:27:38 -07:00
Sam Lantinga
2857e3c748
Added an entry for the Mad Catz FightStick TE 2+ PS3
2022-09-22 15:53:32 -07:00
Sam Lantinga
6812f1b5d7
Fixed the entry for the HORI Fighting Commander 4 in PS4 mode
2022-09-22 15:16:34 -07:00
Sam Lantinga
99e85cc27b
Accidentally reverted 172865ff13
2022-09-22 10:10:20 -07:00
Sam Lantinga
6cbdc66650
Fixed use of uninitialized 'size' variable (thanks @ozkan!)
2022-09-22 09:05:06 -07:00
Sam Lantinga
0c4594ac72
Improved PS4 and PS5 third-party controller feature detection
2022-09-22 06:45:46 -07:00
Frank Praznik
399cb2f0de
wayland: Only clear the key repeat flag when the repeated key is released
...
If multiple keys were simultaneously depressed and one was being repeated, the repeat flag was being cleared when any of the pressed keys were released, even if the released key wasn't the one being repeated.
This tracks the key currently being repeated and only clears the repeat flag when the particular key being repeated is released.
2022-09-21 14:26:13 -07:00
Sam Lantinga
eb25f6c912
Fixed Xbox platform name, courtesy of @walbourn
2022-09-21 14:22:38 -07:00
Ozkan Sezer
098a7a043e
add missing quotes to the fallback CHECK_OBJC_SOURCE_COMPILES macro
...
Closes: https://github.com/libsdl-org/SDL/issues/6268 .
2022-09-21 10:37:02 +03:00
zhailiangliang
00b67f5572
Fix potential memory leak in GLES_CreateTexture
2022-09-20 20:14:01 -07:00
past-due
301912a5b9
Fix: Use WIN_ClientPointToSDL for converting additional mouse coordinates
2022-09-21 03:40:50 +03:00
Ivan Epifanov
08a331847b
Vita: fix controls on PSTV with opened IME
2022-09-20 11:03:34 -07:00
Ozkan Sezer
db225dec41
autotools: stop using AC_FUNC_MEMCMP and AC_FUNC_STRTOD
...
Closes: https://github.com/libsdl-org/SDL/issues/6266 .
2022-09-20 20:03:20 +03:00
Sam Lantinga
dc2a682a82
Use the right kind of 0
2022-09-20 09:22:43 -07:00
Sam Lantinga
2461930601
Fixed build on RISC OS
2022-09-20 09:16:10 -07:00
Ozkan Sezer
887ae0c6eb
fix build failure after commit 2a8d00634d
if strtod isn't available.
2022-09-20 18:20:00 +03:00
Sam Lantinga
2a8d00634d
Fixed scanning a negative number as an unsigned value
...
e.g. sscanf("-1", "%zu", &v)
Thanks to @sezero for the test case
2022-09-20 07:25:49 -07:00
Ozkan Sezer
3f5c46663e
SDL_vsscanf: fix an uninitialized warning
2022-09-20 11:56:40 +03:00
Sam Lantinga
216e3f10bb
Implemented size_t format specifiers for SDL_snprintf() and SDL_sscanf()
...
Fixes https://github.com/libsdl-org/SDL/issues/6264
2022-09-19 15:42:11 -07:00
Sam Lantinga
c70ffc2a35
Added size_t format specifier test coverage for SDL_snprintf and SDL_sscanf
2022-09-19 15:34:17 -07:00
Sam Lantinga
101306edcf
Do case insensitive matching on test cases
2022-09-19 14:37:10 -07:00
Anonymous Maarten
3b20e0ecef
cmake: only add -Wl,--undefined=WinMain when building an executable
2022-09-19 05:00:24 +03:00
Ozkan Sezer
c833294817
tests, watcom: silence lots of W202 warnings from new vulkan headers.
2022-09-18 17:33:04 +03:00
Cameron Cawley
8598f05b47
Support loading 2bpp .bmp files
2022-09-17 16:50:45 -07:00
Cameron Cawley
1f7a7fd931
haiku: Combine HAIKU_ColorSpaceToBitsPerPixel and HAIKU_BPPToSDLPxFormat
2022-09-17 18:13:08 -04:00
Cameron Cawley
dd51787e07
Fix SDL_PIXELFORMAT_INDEX1LSB test case
2022-09-17 13:18:32 -07:00
Cameron Cawley
43fc6d593f
Fix incorrect return value in X11_GetPixelFormatFromVisualInfo
2022-09-17 13:17:42 -07:00
Ivan Epifanov
202dfea502
Vita: drop memory defines
2022-09-17 10:12:46 -07:00
Ivan Epifanov
7115ceb775
Vita: restore sceClibMemcmp
2022-09-17 10:12:46 -07:00
Sam Lantinga
2e9f5b5989
Added support for the HORI Fighting Commander OCTA (Xbox Series X and PS versions)
2022-09-16 15:41:35 -07:00
Ozkan Sezer
5fba31f6fb
SDL_HasPrimarySelectionText: fix -Wunreachable-code-return warning.
2022-09-17 00:51:00 +03:00
Sam Lantinga
efe01faa8e
Replaced Blit4to4CopyAlpha() with optimized SDL_BlitCopy()
...
Fixes https://github.com/libsdl-org/SDL/issues/6241
2022-09-16 10:09:13 -07:00
Ozkan Sezer
c0baa6bf5e
move SDL_windowstaskdialog.h contents into SDL_windowsmessagebox.c
...
Silences clang -Wpragma warnings:
D:/a/SDL/SDL/src/video/windows/SDL_windowstaskdialog.h:21:10: warning: the current #pragma pack alignment value is modified in the included file [-Wpragma-pack]
#include <pshpack1.h>
^
D:/a/_temp/msys64/clang64/include/pshpack1.h:7:9: note: previous '#pragma pack' directive that modifies alignment is here
#pragma pack(push,1)
^
In file included from D:/a/SDL/SDL/src/video/windows/SDL_windowsmessagebox.c:35:
D:/a/SDL/SDL/src/video/windows/SDL_windowstaskdialog.h:156:10: warning: the current #pragma pack alignment value is modified in the included file [-Wpragma-pack]
#include <poppack.h>
^
note: previous '#pragma pack' directive that modifies alignment is here
2 warnings generated.
Closes: https://github.com/libsdl-org/SDL/issues/6240
2022-09-16 20:03:50 +03:00
Sam Lantinga
82b40f097b
Fixed runaway CPU usage in the metal renderer when the window is minimized
2022-09-16 09:55:20 -07:00
Sam Lantinga
5892ed4373
Fixed Xcode warnings on macOS
2022-09-16 09:44:39 -07:00
Sam Lantinga
910d499c54
Fixed comment typo
2022-09-16 09:19:20 -07:00
Sam Lantinga
172865ff13
Don't enumerate HID devices on macOS if we don't have input monitoring permissions
...
Unfortunately the only way to detect this is to actually try opening a device, so we wait until the application tries, and then stop enumerating afterwards.
Fixes https://github.com/libsdl-org/SDL/issues/5781
2022-09-16 09:16:18 -07:00
Sam Lantinga
eb046958da
Fixed build warning
2022-09-16 08:19:45 -07:00
Sam Lantinga
8fc133ac2c
Updated Xcode project with new offscreen video driver files
2022-09-16 08:18:42 -07:00
Sam Lantinga
e2753e19e8
Calculate simulated vsync interval based on display refresh rate
2022-09-16 07:44:40 -07:00
Sam Lantinga
208964f038
Reset the simulated vsync presentation timeline if it's been too long since the last present
2022-09-16 07:44:40 -07:00
Sam Lantinga
1663cb4196
Reset simulated presentation timeline when vsync status changes
2022-09-16 07:44:40 -07:00
Sam Lantinga
d744aafb05
Added support for simulated vsync in the renderer
...
This kicks in if the platform doesn't support vsync directly, or if the present fails for some reason (e.g. minimized on some platforms)
Fixes https://github.com/libsdl-org/SDL/issues/5134
2022-09-16 07:44:40 -07:00
Ozkan Sezer
339f7a2f6b
SDL_windows.h: guard WIN32_LEAN_AND_MEAN and STRICT macro defines.
...
also define them as 1, instead of empty.
Reference issue: https://github.com/libsdl-org/SDL/issues/6239
2022-09-16 17:28:20 +03:00
Ozkan Sezer
c23fb235c8
SDL_render_d3d12.c: Fix uninitialized warning for CreateEventExFunc
2022-09-16 17:20:56 +03:00
Ozkan Sezer
d86cb8ec9e
SDL_offscreenwindow.c: swap include order of SDL_egl_c.h/SDL_sysvideo.h
...
Fixes redefinition warnings from windows builds.
Reference issue: https://github.com/libsdl-org/SDL/issues/6239
2022-09-16 17:05:02 +03:00
Sam Lantinga
5bc85d6788
Only advertise the SDL_PIXELFORMAT_EXTERNAL_OES format if we can build the shader for it
2022-09-16 06:15:45 -07:00
Sam Lantinga
6de15ffcd6
Fixed building offscreen video driver without EGL support
...
Also did miscellaneous style cleanup for consistency with other code
2022-09-15 12:04:08 -07:00
Sam Lantinga
cc9638f2f7
Regenerated configure
2022-09-15 11:08:00 -07:00
quyykk
37effc7700
Build the offscreen video driver by default.
2022-09-15 10:59:37 -07:00