chalonverse
8303c5d0a3
Added missing SDL_zero for renderTargetViewDesc
2022-06-08 12:51:09 -07:00
Sam Lantinga
d58d637ac6
Added support for the Qanba Obsidian Arcade Joystick on Linux
2022-06-08 11:07:36 -07:00
Charlie Birks
0fcfaf9e94
emscripten: use MAIN_THREAD_EM_ASM for the fb/cursor proxying
...
This is how everything else was handled and fixes undefined symbol
errors in non-threads builds.
2022-06-08 08:09:46 -07:00
chalonverse
7a335df9cf
Updated CMakeLists.txt and configure.asc/script so that it checks for the required Windows SDK version before it enables the d3d12 renderer. Also fixed reported warnings in some builds.
2022-06-07 17:07:33 -07:00
Sylvain
2cc2260435
Fixed bug #5768 - SDL_RenderGeometry's software backend failed to render when texture coordinates are reversed
...
handle flip vertical/horizontal when reconstructing rects from triangles
2022-06-07 16:30:01 +02:00
chalonverse
4082821822
DirectX 12 Renderer ( #5761 )
...
* DirectX 12 Renderer (27 squashed commits)
* Add missing SDL_hidapi.h of merge of SDL.vcxproj.filters
* Fixed OpenWatcom build failure
* Dynapi fix
Co-authored-by: Ryan C. Gordon <icculus@icculus.org>
2022-06-06 17:42:30 -07:00
Ozkan Sezer
63e12cf601
SDL_windows_main.c: replace CopyMemory() with SDL_memcpy()
2022-06-06 22:55:56 +03:00
Ryan C. Gordon
ec0204d243
x11: Don't use GetXftDPI() when XRandR can tell us the DPI per-output.
...
Fixes #5764 .
2022-06-06 14:39:58 -04:00
Ozkan Sezer
61115aebd3
update dynapi after the loongarch support patch
2022-06-06 19:29:56 +03:00
yuanhecai
50d8642fa3
Add optimiztion function with LSX in LoongArch
...
1. yuv420_rgb24_lsx
1. yuv420_rgba_lsx
2. yuv420_bgra_lsx
3. yuv420_argb_lsx
4. yuv420_abgr_lsx
2022-06-06 08:49:09 -07:00
yuanhecai
17f63e53f8
Add loongarch support
...
LSX and LASX are enabled by default if compiler supports them.
2022-06-06 08:49:09 -07:00
Ryan C. Gordon
9703f23663
SDL_SetHintWithPriority: actually, this test is good.
...
Otherwise, we end up calling the callback if both the old and new value
are NULL.
This reverts commit 5f25a6ea78
(and also
trims some whitespace).
2022-06-06 10:55:29 -04:00
Ryan C. Gordon
5f25a6ea78
Revert "SDL_SetHintWithPriority: better test if hint value has changed."
...
Actually, the original test was fine, disregard.
This reverts commit c391bdc160
.
2022-06-06 09:36:20 -04:00
Ryan C. Gordon
c391bdc160
SDL_SetHintWithPriority: better test if hint value has changed.
2022-06-06 09:31:35 -04:00
Ryan C. Gordon
55a07d91fa
SDL_SetHintWithPriority: Allow setting NULL hints.
...
Fixes #5120 .
2022-06-06 09:30:43 -04:00
Ryan C. Gordon
a236bf4f25
x11: Hook up display hotplug notifications.
...
Obviously this needs XRandR support.
Fixes #4977 .
2022-06-06 02:13:37 -04:00
Ryan C. Gordon
6b4bd5a759
test_harness: Report if zero tests to run.
...
Fixes static analysis complain about a potential malloc(0) call.
2022-06-05 09:34:54 -04:00
Christoph Reichenbach
3a20274ddf
Refactoring: move GUID operations out of Joystick
...
- SDL_JoystickGUID -> SDL_GUID (though we retain a type alias)
- Operations for GUID <-> String ops are now in
src/SDL_guid.c and include/SDL_guid.h
- The corresponding Joystick operations delegate to SDL_guid.c
- Added test/testguid.c
2022-06-04 17:22:13 -07:00
Sam Lantinga
423141bfca
Added a function to get the controller firmware version
2022-06-03 18:50:00 -07:00
Sam Lantinga
17410887d0
Separated controller type data into a C file
2022-06-03 15:03:08 -07:00
Sam Lantinga
ae2cc29f8b
Make sure initial state is set correctly for the D3D renderer
...
Fixes https://github.com/libsdl-org/SDL/issues/5749
2022-06-03 09:44:34 -07:00
David Gow
847539afeb
wayland: Only call libdecor_dispatch() if we've loaded libdecor
...
As of #5703 , we call libdecor_dispatch() in Wayland_WaitEventTimeout(),
but this will crash if we don't load libdecor, as
SDL_VideoData::shell.libdecor will be NULL.
Since we don't load libdecor if we don't intend to use it (i.e., if
should_use_libdecor returns false), this results in a crash under KDE in
almost all circumstances.
2022-06-01 08:32:13 -07:00
Sam Lantinga
7fa46ec40b
The Google Pixel fingerprint sensor also shows up on Linux when running on the phone
2022-05-31 11:11:19 -07:00
Ethan Lee
964e979d06
hidapi: Allow disabling libusb support at runtime
2022-05-30 13:45:24 -07:00
Sam Lantinga
c87b0142fe
Fixed building with C89 compiler
2022-05-30 12:02:25 -07:00
Guldoman
f78f775238
ime: windows: allocate space for null terminator
2022-05-28 08:57:29 -07:00
Sam Lantinga
fd2a2eea10
Fixed declaration-after-statement warning
2022-05-28 07:49:18 -07:00
Sam Lantinga
d2c4d74dd0
Fixed build with MinGW-64 windows.devices.power.h
...
The MinGW-64 header defines the parameters as ABI::Windows::Foundation::IReference<INT32 > **, but the Windows header defines the parameters as __FIReference_1_int**
2022-05-27 15:49:35 -07:00
Sam Lantinga
bd22ca762e
Revert "Workaround for compiling with MinGW-w64"
...
This reverts commit efdf43aa9b
.
The broken mingw headers aren't in an official release yet, so reporting this upstream.
2022-05-27 15:40:50 -07:00
Sam Lantinga
efdf43aa9b
Workaround for compiling with MinGW-w64
...
Fixes bug https://github.com/libsdl-org/SDL/issues/5589
2022-05-27 15:34:45 -07:00
Sam Lantinga
bef9f2b2c4
Don't trigger device notifications when Steam Deck backlight changes
2022-05-26 20:45:48 -07:00
Cameron Cawley
347659e8cf
riscos: Ensure that last_mouse_buttons is initialised correctly
2022-05-25 14:26:36 -07:00
Cameron Cawley
cb43eb43f8
riscos: Ensure the mouse focus is set when creating the window
2022-05-25 14:26:36 -07:00
Cameron Cawley
6eda520f64
riscos: Add a basic implementation of SDL_ShowCursor()
2022-05-25 14:26:36 -07:00
Sam Lantinga
22d6e09a8d
Don't try to call hid_ble_scan() if HIDAPI is disabled
...
Fixes https://github.com/libsdl-org/SDL/issues/5699
2022-05-25 11:05:39 -07:00
Sam Lantinga
b28d304b23
Only include controller_type.h in SDL_joystick.c
...
It has a huge array of controllers and we only want it instantiated once
2022-05-24 17:24:54 -07:00
Ozkan Sezer
9220f92bae
hidapi/libusb/hid.c (read_thread): mark as SDLCALL
2022-05-25 01:01:02 +03:00
Simon McVittie
412ceb84d4
video: Only check major version in SDL_GetWindowWMInfo
...
Since #5602 , SDL is intended to have the same ABI across the whole
major-version 2 cycle, so we should not check that the minor version
matches the one that was used to compile an application.
There are two checks that could make sense here.
The first check is that the major version matches the expected major
version. This is usually unnecessary and is not usually done (if we're
calling into the wrong library we'll likely crash anyway), but since we
have the information, we might as well continue to use it.
The second check is whether the version provided by the caller is
equal to or greater than a threshold version at which additional fields
were added to the struct. If it is, we should populate those fields;
if it is not, then we cannot. This is only useful on platforms where
additional fields have genuinely been added during the lifetime of
SDL 2, like Windows and DirectFB (but not X11).
This commit changes the first check to be consistent about only looking
at the minor version, while leaving the second check using SDL_VERSIONNUM
(which will be removed or widened in SDL 3, but it's fine for now).
Resolves: https://github.com/libsdl-org/SDL/issues/5711
Fixes: cd7c2f1
"Switch versioning scheme to be the same as GLib and Flatpak"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-24 08:56:23 -07:00
Mathieu Eyraud
fe46569cce
Fix potential memory leak in SDL_AddHintCallback
2022-05-21 09:47:34 -07:00
Ivan Le Lann
e4b5afa576
fix unused variable depending on YUV format
2022-05-21 09:46:46 -07:00
Christian Rauch
e59cba95a0
add libdecor_dispatch
2022-05-21 09:40:26 -07:00
Ryan C. Gordon
dc62fec5e9
audio: Fix locking in backends that manage their own callback threads.
...
Otherwise you might get a race where an app pauses the device, but
the audio callback still manages to run after the pause is in place.
2022-05-20 21:08:29 -04:00
Sam Lantinga
b1cf322971
Fixed HIDAPI PS4 controller being picked up when running under Steam
...
Input with PS4 configuration enabled
2022-05-19 16:50:59 -07:00
Ryan C. Gordon
9edd411a83
x11: send move/resize events when waiting on fullscreen change.
...
Otherwise we ignore the Configure/etc events when they come in because
the window is already in an identical state as far as SDL is concerned.
Fixes #5593 .
May also fix:
Issue #5572 .
Issue #5595 .
2022-05-19 17:19:52 -04:00
Cameron Cawley
b798e49c92
Fix build warning with MSVC
2022-05-19 23:55:24 +03:00
Cameron Cawley
f0566702c5
Fix enabling SDL_DYNAMIC_API in OpenWatcom builds
2022-05-19 20:11:10 +03:00
Cameron Cawley
3d52d04977
Remove the '_' prefix from symbol names in Windows OpenWatcom builds
2022-05-19 20:11:10 +03:00
Cameron Cawley
9dfa000bc0
Initial support for building for Windows with OpenWatcom
2022-05-19 20:11:10 +03:00
Sam Lantinga
5669743a43
Make sure SDL_CaptureMouse() is only called on the main thread
...
Windows handles mouse capture on a per-thread basis, and capture must be done on the thread used to create a window.
Fixes https://github.com/libsdl-org/SDL/issues/5577
2022-05-19 09:52:47 -07:00
Ozkan Sezer
15781a6986
dynapi: fix SDL_DYNAPI_PROC for SDL_iPhoneSetAnimationCallback()
2022-05-19 18:55:02 +03:00