Ryan C. Gordon
60ddb74cfe
video: rework how we prepare a texture framebuffer.
...
Now we see if we can create an SDL_Renderer, and if that renderer reports
itself as "accelerated," and added some initial heuristics to the OpenGL
renderer to make better decisions about what qualifies as "accelerated."
This adds some FIXMEs that might be merely hypothetical, and removes the
old OpenGL checks from the video subsystem that probably weren't meaningful
in modern times. This will definitely need to improve the existing list
in the GL renderer, to catch things like llvmpipe, etc.
Reference issue #4624 .
2022-02-23 09:36:06 -05:00
Wohlstand
08d27dfd7b
SDL_openslES.c: Detect float support in runtime and use it
...
Allow using of the float output type on newer Android devices, but keep PCM16 output on older
Closes #5358
2022-02-22 08:31:14 -08:00
Ryan C. Gordon
293a0aa80e
opengl: If GL version >= 2.0, NPOT textures are supported, so favor them.
...
Fixes #5041 .
2022-02-22 10:54:21 -05:00
Sam Lantinga
9299a3e796
Workaround for crash in CoUninitialize()
2022-02-21 16:24:45 -08:00
Sam Lantinga
978fbc3250
Fixed compile warnings
2022-02-21 12:02:44 -08:00
Sam Lantinga
6c531c4334
Correct handling of sentinel events when polling without removing events
...
Fixes https://github.com/libsdl-org/SDL/issues/5350
2022-02-21 11:35:31 -08:00
Cacodemon345
d90bd261f3
wscons: Make USB keyboard input layout independent
2022-02-18 09:30:04 -08:00
Sylvain
9d86ec8573
Palette format: software Render Jitter in rotation (see #5143 )
...
- same fix applied for rotation with palette surfaces
- allow other 8bits format (eg 332)
2022-02-18 09:57:10 +01:00
Sylvain
ceb09ee740
Fixed #5143 - software Render Jitter in rotation
...
better precision calculating rotated coordinates and interpolation
2022-02-17 23:11:02 +01:00
Sam Lantinga
18032979d8
Added the hint SDL_HINT_JOYSTICK_ROG_CHAKRAM to control whether ROG Chakram mice show up as joysticks
...
This hint defaults off, but when it is enabled the mice will have a game controller mapping set up for Profile 3 (set in the Armoury Crate software)
2022-02-15 13:07:51 -08:00
Sylvain
75ffa24e3a
Software Render Jitter in rotation (bug #5143 )
...
The output surface doesn't necessarily to have even width and height.
2022-02-15 13:35:59 +01:00
Sylvain
61abc4e5b6
PSP: SDL_RenderCopyEx rotation and global scaling around the wrong way (see #bug 3070)
2022-02-15 11:34:50 +01:00
Sylvain
18b76fcc5d
Fixed bug #3070 - SDL_RenderCopyEx rotation and global scaling around the wrong way (software renderer)
2022-02-15 11:33:56 +01:00
Sylvain
e366ad1288
Fixed bug #2308 : SDL_RenderCopyEx rotation center precision (software renderer)
2022-02-15 10:02:34 +01:00
Wouter Wijsman
66ee79bd68
[PSP] Don't swizzle streaming textures
...
It was causing issues in the teststreaming demo and unswizzling
later is inefficient and causes issues.
2022-02-14 10:59:25 +01:00
Sam Lantinga
f97a29f6e1
Use the real device VID/PID when seeing the Steam virtual controller
2022-02-11 22:10:33 -08:00
Sylvain
85e6500065
X11 Segmentation fault with multiple windows and renderers (see #5256 )
2022-02-11 11:08:08 +01:00
Sylvain
a75041e8dd
Fixed bug #2140 : basic support to convert 16 colors palette PIXELFORMAT_INDEX4, to allow conversion to SDL_Texture
2022-02-10 13:44:59 +01:00
Wouter Wijsman
abc8198a1f
Render all sides when drawing rect on PSP
2022-02-09 09:36:19 -08:00
Frank Praznik
228db35287
audio: pipewire: Tidy up formatting
2022-02-08 14:33:34 -05:00
Frank Praznik
9da9e85cba
audio: pipewire: Reset all hotplug values and pointers on shutdown
...
Ensure that all hotplug variables and pointers are reset to NULL or their original value when shutting down.
2022-02-08 14:33:34 -05:00
Frank Praznik
5b36a527ed
audio: pipewire: Remove redundant locks
...
The io_list_check_add() and io_list_remove() functions are only ever called from within the Pipewire thread loop, so the locks are redundant. io_list_sort() is called from within a lock in the device detection function, so those additional locks are redundant as well.
2022-02-08 14:33:34 -05:00
Frank Praznik
48b4d1c412
audio: pipewire: Convert atomic hotplug conditional variables to SDL_bool
...
The hotplug loop condition variables are always guarded by the loop mutex while the loop is running, so they don't need to be atomic.
2022-02-08 14:33:34 -05:00
Ozkan Sezer
67f12ede3b
move bug #5333 fix to headers
2022-02-08 21:32:50 +03:00
Wouter Wijsman
54304b971d
Fix rotation direction and center point on PSP
2022-02-08 09:47:10 -08:00
Wouter Wijsman
2b572dff88
Make RenderCopyEx rotate around center
...
This still isn't perfect. The rotation is the wrong way around and the
images are upside down.
2022-02-08 09:47:10 -08:00
Ozkan Sezer
7935cfacc5
SDL_mfijoystick.m: use __typeof instead of typeof.
...
Fixes https://github.com/libsdl-org/SDL/issues/5319
2022-02-08 18:55:10 +03:00
Ozkan Sezer
9b817248c5
SDL_spinlock.c: define HAVE_GCC_ATOMICS for windows/clang builds,
...
... if not already defined.
Fixes https://github.com/libsdl-org/SDL/issues/5333
diff --git a/src/atomic/SDL_spinlock.c b/src/atomic/SDL_spinlock.c
index bdd347e..4f10741 100644
--- a/src/atomic/SDL_spinlock.c
+++ b/src/atomic/SDL_spinlock.c
@@ -28,6 +28,12 @@
#include "SDL_mutex.h"
#include "SDL_timer.h"
+#if defined(__WIN32__) && defined(__clang__)
+# ifndef HAVE_GCC_ATOMICS
+# define HAVE_GCC_ATOMICS 1
+# endif
+#endif
+
#if !defined(HAVE_GCC_ATOMICS) && defined(__SOLARIS__)
#include <atomic.h>
#endif
2022-02-08 18:50:02 +03:00
Sylvain
e7e44df039
Dynapi: add SDL_GetTouchName() entry
2022-02-08 11:34:41 +01:00
Sylvain
34d4f5b14e
Fixed bug #2032 : add SDL_GetTouchName to expose the driver name of the device (Thanks @mgerhardy!)
2022-02-08 11:32:20 +01:00
Frank Praznik
53091e36a3
audio: pipewire: Remove the hard upper bound on rates and buffer sizes
...
Remove the hard upper limit of 8192 samples and instead use the buffer sizes provided by Pipewire to determine the size of the intermediate input buffer and whether double buffering is required for output streams. This allows for higher latency streams to potentially avoid double-buffering in the output case, and we can guarantee that the intermediate input buffer will always be large enough to handle whatever Pipewire may deliver.
As the buffer size calculations occur in a callback in the Pipewire processing thread itself, the stream readiness check has been modified to wait on two distinct flags set when the buffers have been configured and when the stream is ready and running.
2022-02-07 15:11:31 -05:00
Frank Praznik
66866249a2
audio: pipewire: Condition variable doesn't need to be atomic
...
The condition variable is guarded by a mutex, so no need for it to be atomic.
2022-02-07 15:11:31 -05:00
Sylvain
b0dd4c7d36
SDL_Render OpenGL: do batching like in the GLES2 backend (with no VBO)
2022-02-07 14:02:20 -05:00
Sylvain
90f0d2ce49
Revert OpenGL point drawing performance, do to proper batching
2022-02-07 14:02:20 -05:00
waddlesplash
423feac69b
haiku: Actually remove BDirectWindow and fix OpenGL handling.
...
This provides the other half of 05c72b113c830392f8b08532317ef07972b29a2e.
2022-02-06 19:19:21 -05:00
pionere
6d5592a201
minor cleanup of SDL_CreateRenderer
2022-02-05 10:05:25 -05:00
Ozkan Sezer
e8c48981f9
pthread/SDL_systhread.c: always include errno.h
...
fixes build for several targets after commit 87b02d3
for bug #5283 .
2022-02-05 08:56:56 +03:00
Sam Lantinga
5c4fff7f63
Don't fail to get battery status if the upower refresh call fails
2022-02-04 14:02:44 -08:00
Ozkan Sezer
c8cee0b8ca
OS2_HasClipboardText: store the boolean result before closing clipboard.
...
just in case..
2022-02-04 23:28:56 +03:00
Ozkan Sezer
c93e552068
minor update to winrt/SDL_sysurl.cpp
...
from: https://github.com/microsoft/vcpkg/blob/master/ports/sdl2/0006-Update-SDL_sysurl.cpp.patch
2022-02-04 20:03:50 +03:00
Ozkan Sezer
3b9e6c1cec
SDL_os2video.c: fixed HasClipboardText() semantics.
...
Empty string in clipboard is expected to give FALSE by SDL_HasClipboardText.
Noticed in a commit by josch1710 in bitwiseworks' os/2 fork.
2022-02-04 19:50:20 +03:00
Joshua Ashton
86b7a0642f
Add additional VID/PIDs for Anne Pro II
...
This thing changes its VID/PID on firmware revisions...
2022-02-04 08:45:19 -08:00
Sam Lantinga
dd69c28d6f
Added a mapping for the Xbox Series X controller, firmware version 5.11.3118.0, connected to Linux via Bluetooth
2022-02-03 18:01:34 -08:00
Temdog007
b59e75c259
Handle menu button press from controller
2022-02-02 21:21:44 -08:00
pionere
2cfc83eab7
sync D3D_RenderReadPixels with D3D11_RenderReadPixels
...
- use the result of SDL_ConvertPixels to propagate error
- get rid of the verbose error message of D3D11_RenderReadPixels in case SDL_ConvertPixels failed
2022-02-02 14:56:38 -05:00
pionere
3bef4a5da6
cleanup error-handling in SDL_egl.c
...
- always set error message in SDL_EGL_ChooseConfig / SDL_EGL_CreateContext
- assume SDL_EGL_DeleteContext does not alter the error message
- sync generic error message of SDL_EGL_MakeCurrent with SDL_EGL_Get/SetSwapInterval
- do not overwrite error message of SDL_EGL_ChooseConfig in WINRT_CreateWindow
2022-02-02 14:56:21 -05:00
pionere
b5c5052608
cleanup error-handling in SDL_bmp.c
...
- add missing error-message in SDL_LoadBMP_RW
- check return value of SDL_RWtell in SDL_LoadBMP_RW
- use standard SDL_EFREAD error instead of custom strings
+ adjust return type of readRlePixels
2022-02-02 14:55:36 -05:00
pionere
19df4af2aa
simplify SDL_DUMMY/OFFSCREEN_CreateWindowFramebuffer
2022-02-02 14:45:48 -05:00
SonicMastr
ecd922b5cf
Fix touch holding detection after #5244 changes
2022-02-02 08:55:26 -08:00
Sylvain
df0d696a62
RISCOS: attempt to fix compilation ERANGE
2022-02-02 15:22:14 +01:00