Sylvain
54ca1d190e
SW_RenderGeometry: add a redundant check to clear static analysis (see bug #4600 )
2021-08-27 07:44:03 +02:00
Sylvain
b17aa5d080
SW_RenderGeometry: remove a few static analysis false positives (see bug #4600 )
2021-08-27 07:16:40 +02:00
David Gow
3261f7f6ce
audio: Support "pulse" as an alias for "pulseaudio"
...
Originally, SDL 1.2 used "pulse" as the name for its PulseAudio driver.
While it now supports "pulseaudio" as well for compatibility with SDL
2.0 [1], there are still scripts and distro packages which set
SDL_AUDIODRIVER=pulse [2]. While it's possible to remove this in most
circumstances or replace it with "pulseaudio" or a comma-separated list,
this may still conflict if the environment variable is set globally and
old binary builds of SDL 1.2 (e.g. packaged with older games) are being
used.
To fix this on SDL 2.0, add a hardcoded check for "pulse" as an audio
driver name, and replace it with "pulseaudio". This mimics what SDL 1.2
does (but in reverse). Note that setting driver_attempt{,_len} is safe
here as they're reset correctly based on driver_attempt_end on the next
loop.
[1] d951409784
[2] https://bugzilla.opensuse.org/show_bug.cgi?id=1189778
2021-08-25 22:43:32 -10:00
Sam Lantinga
503ea8e89f
Don't modify the Nintendo Switch home LED state by default
2021-08-25 14:42:16 -07:00
Vanfanel
b1e492d1fc
Search for an appropiate plane instead of simply using the first one.
2021-08-25 10:51:26 -10:00
Eric Engestrom
23ffa3d914
Update SDL's copy of the EGL headers from Khronos
2021-08-25 10:50:21 -10:00
Ethan Lee
524964f966
Add SDL_HINT_VIDEO_EGL_ALLOW_TRANSPARENCY
2021-08-25 16:40:02 -04:00
Eric Engestrom
5113fedfa0
video/wayland: use EGL_EXT_present_opaque when available
2021-08-25 16:40:02 -04:00
Sam Lantinga
130b6bebae
Manually scan for Linux joysticks before udev scan runs
...
This allows us to have joysticks sorted by insert time at startup, fixing https://github.com/libsdl-org/SDL/issues/4688
2021-08-24 17:03:19 -07:00
Sam Lantinga
cbccf5bb50
Use SDL_GetHint() instead of SDL_getenv() for Linux joystick hints
2021-08-24 17:03:19 -07:00
Shawn Ellis
0ae2a9f8c3
Fixed the Atari gamecontroller mappings and added Atari Xbox 360
...
This change corrects the mappings for the Atari gamecontroller and
adds support for the Atari Xbox 360 compatible gamecontroller. The Atari
game controller can switch between Atari and Xbox 360 mappings.
2021-08-24 13:06:27 -10:00
Ryan C. Gordon
d5fe9c308a
x11: Log a warning if we decide to use XVidMode.
...
Reference issue #1782 .
2021-08-24 14:29:39 -04:00
Ryan C. Gordon
9504bb121d
pulseaudio: Fix some function signatures that expect const pointers.
...
This might have changed at some point in the Pulse API, or this might have
always been wrong, but we didn't notice because the dynamic loading code
hides it by casting things to void *. The static path, where it
assigns the function pointer directly, puts out a clear compiler warning,
though.
2021-08-23 00:47:25 -04:00
Sylvain
e426bb80cb
Fixed bug #4671 - D3D_QueueGeometry: use "count / 3" (Thanks alittlesail!)
2021-08-20 07:50:30 +02:00
Oschowa
70c23b25f0
audio: pipewire: Reset hotplug atomic variables on deinit.
2021-08-19 22:26:25 -04:00
Sylvain
ae5336a3d2
Fixed bug #4669 : D3D_QueueGeometry: -0.5f offset position of vertexs
...
This similar to D3D_QueueCopy positions
2021-08-19 14:03:10 +02:00
Ozkan Sezer
8270172e74
fix -Wshorten-64-to-32 warnings in android builds.
...
see: https://github.com/libsdl-org/SDL/pull/4195#issuecomment-901506386
2021-08-19 12:11:10 +03:00
Ozkan Sezer
ccb06296b9
SDL_windowsevents.c: fix build against older SDKs.
2021-08-19 03:15:02 +03:00
Sylvain
154384a776
Add (uintptr_t) casts
2021-08-19 00:10:59 +02:00
Sylvain
08d6a4653e
Fix dynapi prototypes
2021-08-19 00:10:59 +02:00
Sylvain
1670104ad8
Change 'size_indice' to 'size_indices'
2021-08-19 00:10:59 +02:00
Sylvain
a8f89a01aa
Change 'size_indice' to 'size_indices'
2021-08-19 00:10:59 +02:00
Sylvain
47db47c1cc
Add SDL_HAVE_RENDER_GEOMETRY to compile or not with RenderGeometry support
2021-08-19 00:10:59 +02:00
Sylvain
b9bd9da78f
OpenGLES2: transfert color as 4 bytes, instead of 4 floats
2021-08-19 00:10:59 +02:00
Sylvain Becker
c6ceaaeb4b
METAL: use Uchar4Normalized format to transfert color as 4 bytes, instead of 4 floats
2021-08-19 00:10:59 +02:00
Sylvain
eff840bb9b
Add OpenGLES implementation
2021-08-19 00:10:59 +02:00
Sylvain
32e7910135
Fix warnings
2021-08-19 00:10:59 +02:00
Sylvain
6e47f53869
Fix warnings
2021-08-19 00:10:59 +02:00
Sylvain
4869a3d294
Add Direct3D9 implementation (not tested)
2021-08-19 00:10:59 +02:00
Sylvain
4ba3763897
Save and restore SDL renderer state after transforming triangles to rect
2021-08-19 00:10:59 +02:00
Sylvain
cd0663e053
Fix declaration-after-statement and remove tabs
2021-08-19 00:10:59 +02:00
Sylvain Becker
cd4663dfcb
Update D3D11 for SDL_RenderGeometryRaw
2021-08-19 00:10:59 +02:00
Sylvain Becker
9f59170743
Update METAL backend for SDL_RenderGeometryRaw
2021-08-19 00:10:59 +02:00
Sylvain
61d9e9164f
For the software renderer, try to reinterpret triangles as SDL_Rect
...
With Dear ImGui + software renderer, it draws:
- by default at 250 fps
- drops to 70 fps if you show the color picker
- drops to 10 fps if put the color picker fullscreen
2021-08-19 00:10:59 +02:00
Sylvain
cc37c38e30
Add SDL_RenderGeometry based on SDL_RenderGeometryRaw
2021-08-19 00:10:59 +02:00
Sylvain
e481261173
Move to SDL_RenderGeometryRaw prototype with separate xy/uv/color pointer parameters
2021-08-19 00:10:59 +02:00
Sylvain
111c70e141
Use 64 bits precision to prevent overflow when interpolating color / texture with wide triangles
2021-08-19 00:10:59 +02:00
Sylvain
f73c1eff10
Use normalized texture coordinates
2021-08-19 00:10:59 +02:00
Sylvain
5828cc415a
Update METAL backend: fix a typo in drawline
2021-08-19 00:10:59 +02:00
Sylvain
9eab5195fe
Update dynapi files
2021-08-19 00:10:59 +02:00
Sylvain Becker
9a8a8e65b8
Update SDL_render_d3d11.c
...
Fix D3D11 compilation
2021-08-19 00:10:59 +02:00
Sylvain Becker
121114d061
Update METAL compiled shaders
2021-08-19 00:10:59 +02:00
Sylvain Becker
2d01573bb9
Add METAL shaders
2021-08-19 00:10:59 +02:00
Sylvain Becker
1e77dae7b7
Add METAL implementation
2021-08-19 00:10:59 +02:00
Sylvain
1ebef0732a
Add D3D11 implementation (not yet tested)
2021-08-19 00:10:59 +02:00
Sylvain
3ee511d71c
Add software renderer implementation
2021-08-19 00:10:59 +02:00
Sylvain
37f78fc1cc
Add OpenGL implementation
2021-08-19 00:10:59 +02:00
Sylvain
faded41ab1
Add OpenGLES2 implementation
2021-08-19 00:10:59 +02:00
Sylvain
6e26d320c6
Add sysrender interface
2021-08-19 00:10:59 +02:00
Sylvain
53a2608bd2
Renderer opengles2: turn color Uniform into Attribute.
...
all attributes are copied interleaved (based on rmg-nik initial patch+
+ minor clean up of data structure
+ add check for colorswap
2021-08-19 00:10:59 +02:00