Commit graph

10248 commits

Author SHA1 Message Date
Ozkan Sezer d18b2e4129 typo fix to config.sub,
from https://lists.gnu.org/archive/html/config-patches/2023-01/msg00001.html
2023-01-21 10:15:02 +03:00
Ozkan Sezer bd5c355a34 SDL_thread.h: fix SDL_CreateThreadWithStackSize macro for OS/2
(cherry-picked from commit 738442b82a)
2022-12-27 00:15:20 +03:00
Ozkan Sezer facc408097 SDL_thread.h: fix beginthread param of SDL_CreateThreadWithStackSize for win32
(cherry-picked from commit 29ba5f5d64)
2022-12-27 00:15:20 +03:00
Vincent Hamm c7d5642e43 Fix SDL_CreateThreadWithStackSize not passing staacksize with win32 static api 2022-12-27 00:15:20 +03:00
Anonymous Maarten b42c033b13 cmake: use target_link_libraries to pass -Wl,--undefined=WinMain
(cherry-picked from commit e2060de714)
2022-11-29 21:15:22 +03:00
Frank Praznik d41985cfbc wayland: Fix libdecor_dispatch signature
The function returns an int, not a bool.
(cherry picked from commit f47169fcba)
2022-11-24 17:27:40 +03:00
Ozkan Sezer c1307133ce SDL_UDEV_DelCallback: return early if _this is NULL
Fixes https://github.com/libsdl-org/SDL/issues/6548
(cherry picked from commit 6dc96aa745)
2022-11-18 18:02:40 +03:00
Sylvain 4d605ae002 Fix usage of sizeof() in test/testgles*.c files
(cherry-picked from commit 71f2864b3a)
2022-11-17 17:29:28 +03:00
Sylvain 3a885f888a
Fixed bug #6537 - AIX: use PAUDIO_WaitDevice 2022-11-17 11:57:07 +01:00
Ozkan Sezer 6539b70062 SDL_pixels.c (SDL_MasksToPixelFormatEnum): add missing break to switch.
Hand-picked from commit ec58a817ef
2022-11-16 20:55:04 +03:00
Ozkan Sezer 8b696541ed CI, MSVC: update to use microsoft/setup-msbuild v1.1.3.
Fixes github deprecation warnings
2022-11-16 00:56:04 +03:00
Anonymous Maarten 711d30ddd4 The SDL2::SDL2 target in SDL2.framework needs to see the SDL2 include folder
SDL.h includes other files through SDL2/SDL_xxx.h
2022-11-15 19:33:43 +01:00
Ryan C. Gordon c93900437f audio: Avoid accumulation errors in resampler.
Fixes #6391.
(cherry picked from commit 78f97108f9)
2022-11-05 20:01:00 +03:00
Sam Lantinga 55b03c7493 Updated to version 2.24.2 for point release 2022-11-01 05:47:12 -07:00
Anonymous Maarten beeac60227 cmake: fix finding wayland-libdecor
It was broken in 11d53c84a7
(cherry-picked from commit 0823b5973a)
2022-10-24 20:37:00 +03:00
Anonymous Maarten 214258660f cmake: use pkg-config's library dirs as hint for finding a shared library
(cherry-picked from commit 11d53c84a7)
2022-10-24 20:37:00 +03:00
Sam Lantinga 08f83f953c Don't use RAWINPUT joystick driver on Windows XP
Fixes https://github.com/libsdl-org/SDL/issues/6400
(cherry-picked from commit 5025f24033)
2022-10-24 20:37:00 +03:00
Sam Lantinga d1dcbfe9e9 Only check to see if the ICC profile changes when the display changes or we gain focus
Fixes https://github.com/libsdl-org/SDL/issues/6366
(cherry-picked from commit 61b5360e17)
2022-10-24 20:37:00 +03:00
Sam Lantinga c0d1f73247 d3d12: actually execute the pending commands before processing resize
This makes sure all the resources are in the expected state

Fix the D3D12 case in https://github.com/libsdl-org/SDL/issues/6376
(cherry-picked from commit df1bd07dee)
2022-10-24 20:37:00 +03:00
Sam Lantinga 923ab93969 d3d12: fixed window resize handling
Fixes https://github.com/libsdl-org/SDL/issues/6355
(cherry-picked from commit f99fc3268e)
2022-10-24 20:37:00 +03:00
Sam Lantinga 1f82b4a96f d3d12: reset the vertex buffer size when it is released
(cherry-picked from commit 490c20f93f)
2022-10-24 20:37:00 +03:00
GNQG a053211a2a fix SDL_SendEditingText when long composition text is enabled and strlen(text) == SDL_TEXTEDITINGEVENT_TEXT_SIZE
(cherry-picked from commit 965ba1e097)
2022-10-24 20:15:00 +03:00
Sam Lantinga 2d580f8f45 Define _USE_MATH_DEFINES for Visual Studio (thanks @pionere!)
Fixes https://github.com/libsdl-org/SDL/issues/3790
(cherry-picked from commit c6e8961979)
2022-10-24 20:04:21 +03:00
Anonymous Maarten b8c6d3d7e1 cmake: mark hidapi as disabled when not found
(cherry-picked from commit 19b13aab98)
(cherry-picked from commit c3495ec6ea)
(cherry-picked from commit 6dfd7a17e1)
2022-10-24 20:04:21 +03:00
Anonymous Maarten 1e5daf1bef cmake: fix build with SDL_WAYLAND_SHARED=OFF
(cherry-picked from commit 711846c1f4)
2022-10-24 20:04:21 +03:00
Simon McVittie 21e23ef913 testevdev: Explain why the test data is encoded the way it is
Signed-off-by: Simon McVittie <smcv@collabora.com>

(cherry-picked from commit 7d230af51d)
2022-10-24 20:04:21 +03:00
Simon McVittie 4a0ad650d0 testevdev: Add a static assertion for supported sizeof(long)
If this assertion fails on some platform (unlikely), we will need a
third implementation for SwapLongLE().

Signed-off-by: Simon McVittie <smcv@collabora.com>

(cherry-picked from commit 81dee31949)
2022-10-24 20:04:21 +03:00
Helge Deller e07f106760 testevdev: Fix detection of word size
The check for whether to use a 32- or 64-bit swap for an array of long
values always took the 64-bit path, because <limits.h> wasn't included
and therefore ULONG_MAX wasn't defined. Turn this into a runtime check,
which a reasonable compiler will optimize into a constant.

This fixes testevdev failures on 32-bit big-endian platforms such as hppa
and older powerpc. Little-endian and/or 64-bit platforms are unaffected.

[smcv: Added commit message]
Bug-Debian: https://bugs.debian.org/1021310
Co-authored-by: Simon McVittie <smcv@collabora.com>

(cherry-picked from commit fb32effd15)
2022-10-24 20:04:20 +03:00
Sam Lantinga 88e64108f5 Clarified that GNU sort isn't required, we just need the -V option to be supported
(cherry-picked from commit f687cbd4c6)
2022-10-24 20:04:20 +03:00
Sam Lantinga 1b5bf2ac65 GNU sort isn't available on older macOS and some BSD systems
Don't prevent building entirely, just warn that we won't be able to find dynamic libraries in this case.

Fixes https://github.com/libsdl-org/SDL/pull/6338
(cherry-picked from commit 8c587636dc)
2022-10-24 20:04:20 +03:00
Ozkan Sezer 679d33ab44 updated VS project file
(cherry-picked from commit e3b2830f99)
2022-10-24 20:04:20 +03:00
Ozkan Sezer 9e72ec4ed9 Makefile.w32: no need for the description field, we have a *.res already
(cherry-picked from commit 1b52145bad)
2022-10-24 20:04:20 +03:00
Ozkan Sezer 8104992064 testhaptic: fix watcom "&array may not produce intended result" warning
(cherry-picked from commit d022039529)
2022-10-24 20:04:20 +03:00
Ozkan Sezer 51958da000 loadso, dlsym, SDL_LoadFunction: cleanup the underscored name path.
- strlcpy was passed a wrong buffer length parameter. has worked so
  far by luck.
- use memcpy instead of strlcpy for simplicity.
- 'append' has been a typo: should be 'prepend'.

(cherry-picked from commit 3d415bc5d6)
2022-10-22 20:04:20 +03:00
Ozkan Sezer b435252b29 hidapi, libusb: remove os/2 symbol load hack after os/2 loadso updates
(cherry-picked from commit 65a38a4015)
2022-10-22 20:04:20 +03:00
Ozkan Sezer eb43d57880 os2 loadso improvements:
- SDL_LoadObject: upon failure, strip the .dll extension and retry,
  but only if module name has no path.
- SDL_LoadFunction: upon failure, retry with an underscore prepended,
  e.g. for gcc-built dlls.

(cherry-picked from commit 3f1b5efcca)
2022-10-22 20:04:20 +03:00
Ozkan Sezer 92937ff5e0 os2: fix error message for SDL_LoadObject()
(cherry-picked from commit 4264c0b674)
2022-10-22 20:04:20 +03:00
Anonymous Maarten 36b987dabe cmake: else() does not need an argument 2022-10-20 13:30:37 +02:00
Ryan C. Gordon 266ca2c933 coreaudio: Dispose of AudioQueue before waiting on the thread.
Otherwise the thread might block for a long time (more than 10 seconds!).
It's not clear to me why this happens, or why its safe to do this with a
resource that's still in use, but we have, until recently, always
disposed of the AudioQueue first, so changing back is probably okay.

Also changed the disposal to allow in-flight buffers to reach hardware;
otherwise you lose the last little bit of audio that's already been queued
but not played, which you can hear clearly in the loopwave test program.

Fixes #6377.
(cherry picked from commit e7ab581d79)
2022-10-19 20:29:24 +03:00
Ethan Lee b7e8e6f3b8 wayland: Check for the input handle before checking the keyboard handle
(cherry picked from commit be2cb00066)
2022-10-11 08:31:49 -07:00
Sam Lantinga 30579c8cd7 Don't try to create a semaphore for the mutex implementation if threads are disabled
Fixes https://github.com/libsdl-org/SDL/issues/6344

(cherry picked from commit 17b43b0fdd)
2022-10-10 14:35:30 -07:00
Ozkan Sezer 4726270ead WIN_GetDrawableSize: avoid NULL pointer dereference
Fixes https://github.com/libsdl-org/SDL/issues/6356
2022-10-08 23:01:28 +03:00
Sam Lantinga a1d1946dcb Use DWARF 4 debug information when building using mingw
See this bug for more information:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101377

Fixes https://github.com/libsdl-org/SDL/issues/6139

(cherry picked from commit f18fae4c68)
2022-10-04 16:48:08 -07:00
Sam Lantinga 36524373db Updated version to 2.24.1 for point release
Also merged some updates to test-versioning.sh from main to correctly verify the version
2022-10-04 14:06:15 -07:00
Sam Lantinga 77f3a9cbe8 Only advertise the SDL_PIXELFORMAT_EXTERNAL_OES format if we can build the shader for it
(cherry picked from commit 5bc85d6788)
2022-10-04 12:33:16 -07:00
Sam Lantinga b8dacc37b5 Pretty print shaders for debugging purposes
(cherry picked from commit 2970710b5d)
2022-10-04 12:33:16 -07:00
Sam Lantinga a49a25671d Fixed OpenGL ES shader compilation on Linux
(cherry picked from commit bc57d3e35c)
2022-10-04 12:33:16 -07:00
Sam Lantinga 284cf11778 Fixed uninitialized variable warning
(cherry picked from commit 8a15a738f3)
2022-10-04 12:33:16 -07:00
Sam Lantinga 949addc94e Fixed OpenGLES shaders failing after renderer has been created
Cache all the shaders up front, so we can verify that they won't silently fail at runtime.

If compiling the fragment shaders with the precision hint fails, try again without specifying precision.

Fixes https://github.com/libsdl-org/SDL/issues/6166
Fixes https://github.com/libsdl-org/SDL/issues/6174

(cherry picked from commit b5102a551b)
2022-10-04 12:33:16 -07:00
Amir 23a4b9bdd6 android: fix some compiler warnings
(cherry picked from commit 7f415ce587)
2022-10-04 12:32:10 -07:00