4527 Commits

Author SHA1 Message Date
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
Oschowa
bfa159313b audio: pipewire: Set PW_KEY_NODE_RATE to suggest a rate.
This can be used by recent pipewire to avoid resampling.
2021-08-18 12:40:13 -04:00
Aleksey Rybalkin
402b86f2a8 waylandevents: prevent segfault if xkb compose table is not found
this can happen e.g. on pure wayland system where there is no X11
locales for xkbcommon to find.
2021-08-15 10:11:19 -04:00
Jānis Rūcis
454943cf3e emscripten: Don't flag window fullscreen on external requests
Also, the condition was always true.
2021-08-14 17:04:46 +01:00
Joseph Kogut
55af8dcad9 emscripten: use emscripten_set_window_title api 2021-08-14 17:04:46 +01:00
Joseph Kogut
d8baad7e48 emscripten: use emscripten_get_screen_size api 2021-08-14 17:04:46 +01:00
Charlie Birks
abc04270b7 emscripten: Fix framebuffer array creation optimisation 2021-08-14 17:04:46 +01:00
Charlie Birks
b4f11a3669 emscripten: Drop commented out code from the dummy driver 2021-08-14 17:04:46 +01:00
David Gow
fbc364908a Use the new SDL_clamp() macro where sensible
There were a few places throughout the SDL code where values were
clamped using SDL_min() and SDL_max(). Now that we have an SDL_clamp()
macro, use this instead.
2021-08-14 09:01:14 -07:00
Charlie Birks
07a2d71e90 emscripten: Feed silence to device when paused 2021-08-14 12:24:35 +01:00
Sam Lantinga
dcc5eef0e2 Clarify that one of the PIDs of the Xbox Elite Series 2 controller is used in Bluetooth mode 2021-08-14 00:31:46 -07:00
Sam Lantinga
91a55a02de Relative mouse motion is delivered to the window with keyboard focus
This was the original intent (note SDL_UpdateWindowGrab() in SDL_OnWindowFocusGained() and SDL_OnWindowFocusLost()) and fixes a bug where relative motion unexpectedly stops if the task bar is covering the bottom of the game window and the mouse happens to move over it while relative mode is enabled.

Another alternative would be to confine the mouse when relative mode is enabled, but that generates mouse motion which would need to be ignored, and it's possible for the user moving the mouse to combine with the mouse moving into the confined area so you can't easily tell whether to ignore the mouse motion. See https://github.com/libsdl-org/SDL/issues/4165 for a case where this is problematic.
2021-08-14 00:00:57 -07:00
Sam Lantinga
694771513c Get the window size for the window receiving the mouse motion
This is the mouse focus except in the case where relative motion is enabled and the mouse is over a window floating on top of the application window (e.g. the taskbar)
2021-08-14 00:00:57 -07:00
Sam Lantinga
6a1e1ed9ae Relative mouse mode grab is based on the window with the input focus
This fixes restoring the cursor clip rectangle after the mouse has moved off of the window.

Also try to better synchronize cursor visibility with mouse position changes when changing relative mode. This doesn't work perfectly, but it seems to improve things on Windows.
2021-08-14 00:00:57 -07:00
Sam Lantinga
e42e9a12de Fixed build 2021-08-13 20:48:56 -07:00
Sam Lantinga
441fbcaa3d Added HIDAPI support for the Xbox Adaptive Controller 2021-08-13 20:48:54 -07:00
Sam Lantinga
b5e5c1ef48 Added Ctrl-T to toggle topmost mode in test programs 2021-08-13 17:53:39 -07:00
Sam Lantinga
4d9efcb55c Fixed flag test for boolean correctness 2021-08-13 11:52:25 -07:00
Sam Lantinga
b28ed02803 Don't warp the mouse for relative mode when the window doesn't have focus 2021-08-13 11:39:41 -07:00
Sam Lantinga
629e9f820a Fixed return value of SDL_GetGrabbedWindow() when we have an internal grab because of mouse relative mode 2021-08-13 11:06:43 -07:00
Sam Lantinga
6aa1498b98 This assert wasn't correct, we set the internal grab for mouse relative mode as well. 2021-08-13 11:03:19 -07:00
Sam Lantinga
907943a236 Added support for the Xbox One S Controller with 5.x series firmware 2021-08-12 17:51:08 -07:00
Joshua Root
1e92135297 Improve portability of SDL_Convert51ToStereo_AVX
Don't rely on checking __clang_major__ since it is not comparable
between different vendors. Don't use "#pragma clang attribute" since it
is only available in relatively recent versions, there's no obvious way
to check if it's supported, and just using __attribute__ directly (for
gcc as well) results in simpler code anyway.
2021-08-12 16:04:35 -07:00
Ozkan Sezer
7aec0b90ee SDL_hidapi_xboxone.c: fix bogus 'uninitialized' warning from clang.
The last 'size == 50' check is always true anyway.
2021-08-13 01:56:56 +03:00
Sam Lantinga
cec5a129f5 Fixed libudev hotplug notifications in the HIDAPI driver 2021-08-12 15:49:33 -07:00
Sam Lantinga
6eb4ebb502 Simplified the HIDAPI Xbox One controller initialization 2021-08-12 15:49:33 -07:00
Simon McVittie
25cd749adb x11: Don't change mode if we are already in the correct mode
If we are already in the desired mode, changing it is a no-op at best,
and harmful at worst: on Xwayland, it sometimes happens that we disable
the crtc and cannot re-enable it.

Resolves: https://github.com/libsdl-org/SDL/issues/4630
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-08-12 12:23:40 -07:00
Sam Lantinga
584b89abe6 Added support for the color LED on the Xbox Elite Series 2 controller 2021-08-12 08:17:10 -07:00
Sam Lantinga
64882b2466 Added support for the Xbox One Elite 2 Controller with 5.x series firmware 2021-08-12 08:17:08 -07:00
Ozkan Sezer
ed6eb07e79 SDL_wasapi.c: fixed build against older SDKs. 2021-08-12 01:40:50 +03:00
Andrei Alexeyev
68ca35c318 wayland: fix memleak in output listener 2021-08-11 14:11:52 -07:00
Andrei Alexeyev
e9179314c4 joystick/linux: fix memleaks; streamline joylist item removal 2021-08-11 14:11:52 -07:00
Ozkan Sezer
44a76710d1 Don't disable clang avx instrinsics on win32 if __AVX__ is defined.
C.f.: https://github.com/libsdl-org/SDL/issues/4533
2021-08-11 08:47:52 -07:00
Ethan Lee
ae7ee2a59c wayland: Ignore stateless/sizeless configs when starting in fullscreen mode 2021-08-11 11:02:33 -04:00
Sam Lantinga
ac32c522ad Try using the built-in WASAPI audio rate conversion
Fixes https://github.com/libsdl-org/SDL/issues/4608
2021-08-10 18:11:09 -07:00
Sam Lantinga
cb1e20b058 Added KMOD_SCROLL to track the scroll lock state
Fixes https://github.com/libsdl-org/SDL/issues/4566
2021-08-10 17:50:17 -07:00
Sam Lantinga
f5794f9eeb Added SDL_SetTextureUserData() and SDL_GetTextureUserData() to associate a user-specified pointer with an SDL texture 2021-08-10 15:17:59 -07:00
Sam Lantinga
a0af7ce731 OSS is no longer the preferred audio backend on modern UNIX systems
Fixes https://github.com/libsdl-org/SDL/issues/4207
2021-08-10 15:05:49 -07:00
Sam Lantinga
3f6ebffff4 Updated to version 2.0.17 for development 2021-08-10 15:02:36 -07:00
Sam Lantinga
016b02f24c Fixed build, C89 doesn't allow non-constant static initializers 2021-08-10 12:17:37 -07:00
Ozkan Sezer
77c8d11137 configuration updates for dlopen:
- cmake, configure (CheckDLOPEN): --enable-sdl-dlopen is now history..
  detach the dl api discovery from SDL_LOADSO_DLOPEN functionality.
  define HAVE_DLOPEN. also define DYNAPI_NEEDS_DLOPEN (CheckDLOPEN is
  called only for relevant platforms.)
- update SDL_config.in and SDL_config.cmake accordingly.
- SDL_dynapi.h: set SDL_DYNAMIC_API to 0 if DYNAPI_NEEDS_DLOPEN is
  defined, but HAVE_DLOPEN is not.
- pthread/SDL_systhread.c: conditionalize dl api use to HAVE_DLOPEN
- SDL_x11opengl.c, SDL_DirectFB_opengl.c, SDL_naclopengles.c: rely
  on HAVE_DLOPEN, not SDL_LOADSO_DLOPEN.
- SDL_config_android.h, SDL_config_iphoneos.h, SDL_config_macosx.h,
  SDL_config_pandora.h, and SDL_config_wiz.h: define HAVE_DLOPEN.

Closes: https://github.com/libsdl-org/SDL/pull/4351
2021-08-10 12:07:32 -07:00
hgs3
cb0fd05eeb Adding a clarifying comment in case a programmer unfamiliar with UTF-16 and UTF-32's relationship chances upon the code. 2021-08-10 12:07:11 -07:00