Commit Graph

14438 Commits (7561116873d99e6a566c6cdabd343090f7553c9d)

Author SHA1 Message Date
luzpaz 65e1d568ef Fix various typos (docs/build scripts/tests) 2023-07-03 08:35:37 -07:00
Ryan C. Gordon c0bd18f023
khronos: Fixed a typo in a Vulkan header, to match upstream.
Fixes #7916.
2023-07-03 11:03:20 -04:00
Sam Lantinga f010411492 Rename SDL_strtokr() to SDL_strtok_r()
Fixes https://github.com/libsdl-org/SDL/issues/7914
2023-07-03 06:20:06 -07:00
SDL Wiki Bot b8d6023a91 Sync SDL3 wiki -> header 2023-07-03 01:49:13 +00:00
Sam Lantinga 3c04be4486 The rectangles passed to SDL_BlitSurfaceUnchecked() and SDL_BlitSurfaceUncheckedScaled() are const.
The destination rectangle passed to SDL_BlitSurface() and SDL_BlitSurfaceScaled() is non-const and filled in with the final destination rectangle after clipping, and now documented as such.

Fixes https://github.com/libsdl-org/SDL/issues/7911
2023-07-02 18:45:11 -07:00
Sam Lantinga ced153a24a Fixed reference to old function (thanks @tom-seddon!)
Fixes https://github.com/libsdl-org/SDL/issues/7912
2023-07-02 18:24:53 -07:00
Sam Lantinga 4aee17b039 Resorted symbols alphabetically
This can be be done now, before the ABI is frozen
2023-07-02 00:06:55 -07:00
Sam Lantinga 50b6e5eb7e Implemented SDL_LoadBMP() and SDL_SaveBMP() as functions
Fixes https://github.com/libsdl-org/SDL/issues/7902
2023-07-02 00:00:06 -07:00
Sam Lantinga e264bb5178 Rename SDL_PIXELFORMAT_RGB888 and SDL_PIXELFORMAT_BGR888 to SDL_PIXELFORMAT_XRGB8888 and SDL_PIXELFORMAT_XBGR8888 for clarity
Fixes https://github.com/libsdl-org/SDL/issues/7903
2023-07-01 17:58:34 -07:00
scribam d85e327c92 cmake: use SDL_CPU_ARM32 instead of CMAKE_GENERATOR_PLATFORM STREQUAL "ARM" 2023-07-01 23:25:49 +02:00
Ryan C. Gordon 9d39e50f29
rwops: Use SetFilePointerEx on Windows for appending writes.
Fixes #7900.

(cherry picked from commit 769bf2ebcca8f0cbcde4ec50008942f4eda57f4a)
2023-07-01 00:37:18 -04:00
Sam Lantinga 5b9fdc9dd1 Revert "Zenity has deprecated --icon-name in favor of --icon"
This reverts commit 55c3c1b05c.

It turns out many Linux distributions are shipping zenity which doesn't support the new --icon option. We'll need a more robust fix for this.
2023-06-29 23:01:36 -07:00
Sam Lantinga 55c3c1b05c Zenity has deprecated --icon-name in favor of --icon
Fixes https://github.com/libsdl-org/SDL/issues/7895
2023-06-29 22:45:59 -07:00
Sam Lantinga 18ff0d1878 Fixed build 2023-06-29 22:40:57 -07:00
Sam Lantinga 69c7a49990 Fixed build warnings 2023-06-29 22:15:23 -07:00
Sam Lantinga 97380dcdab We don't need to reserve window flag bits for sdl2-compat
sdl2-compat does the appropriate bit twiddling to preserve compatibility
2023-06-29 22:02:24 -07:00
Sam Lantinga 8da9b22c17 The SDL_WINDOW_SKIP_TASKBAR flag has been replaced by the SDL_WINDOW_UTILITY flag
The SDL_WINDOW_UTILITY flag has the same functionality, and is now implemented on Windows.
2023-06-29 21:43:17 -07:00
Sam Lantinga 675fc8c38f Added Linux mapping for the Logitech Chillstream
Fixes https://github.com/libsdl-org/SDL/issues/7829
2023-06-29 16:10:55 -07:00
Sam Lantinga ba9e924e57 Added additional debug logging for Linux joysticks 2023-06-29 16:09:55 -07:00
Sam Lantinga ffa146f0bc On Windows the mouse speed is affected by the content scale
Fixes https://github.com/libsdl-org/SDL/issues/7802
2023-06-29 14:38:26 -07:00
Anonymous Maarten 4d23eaf81e cmake: only define _FILE_OFFSET_BITS and _TIME_BITS for glibc 2023-06-29 14:55:43 +02:00
Anonymous Maarten c3be4bc18d cmake: Compile with 64-bit time stamps where possible
On platforms where time_t is a signed 32-bit integer, most notably i386 Linux,
various functions stop working when dealing with a timestamp
beyond January 2038.

glibc has an opt-in mechanism that redefines time_t to be 64-bit,
and correspondingly increases the size of all system data
structures that contain a time_t, such as struct timeval and struct stat.
This is necessary to allow timestamps beyond January 2038 to be represented;
as well as things that obviously deal with timestamps, this affects functions
like stat(), which will fail with EOVERFLOW if asked to inspect a file whose
correct timestamp does not fit in time_t. This in turn can cause unexpected
problems for "filesystem APIs" of the form "if /run/foo exists, then ..."
when accessed by 32-bit code, if the check for existence is done with stat()
rather than access().

Using 64-bit timestamps in glibc is an opt-in and not the default, because
if done carelessly it can change libraries' ABIs. However, SDL mostly doesn't
use system headers or types in its own headers. I

Co-authored-by: Simon McVittie <smcv@collabora.com>
2023-06-28 19:47:52 -07:00
Sam Lantinga baa9c57581 Added support for the Nintendo Online Famicom controllers 2023-06-28 19:15:43 -07:00
Simon McVittie 10fc3b3db7 evdev: Use time64-friendly accessors for struct input_event
On 32-bit platforms such as i386, if SDL is compiled with -D_TIME_BITS=64
to opt-in to ABIs that will not stop working in 2038, the fields in
this struct change their naming and interpretation.

The Linux header <linux/input.h> defines macros input_event_sec and
input_event_usec which resolve to the right struct field to look at.
The actual field names and types are an implementation detail,
historically signed 32-bit time.tv_sec and time.tv_usec on 32-bit
platforms, but becoming unsigned __sec and __usec when using 64-bit
time (which makes them able to represent times up to 2106).

Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-06-28 12:35:12 -07:00
Frank Praznik e7327b6c73 wayland: Flush cached themes on a theme change
Flush the cached themes when the system cursor theme changes so that the stale cached value won't be used.
2023-06-28 14:53:11 -04:00
capehill 8315a00a01 Fix crash in AudioConvertByteswap 2023-06-28 14:47:10 -04:00
Frank Praznik fd6cb4dc86 wayland: Add a DBus message handler for the cursor size and theme properties.
Add a DBus message handler to watch and respond to changes to the system cursor size and theme properties. Upon these settings being changed, a cursor refresh will be triggered so the new changes will take effect immediately, without the cursor having to leave and re-enter the window surface.
2023-06-28 13:58:05 -04:00
Sam Lantinga e643d28d9c Set the hint value before calling hint callbacks
This allows the hint callbacks to perform more complicated logic involving multiple hints without worrying about which hint has been changed.
2023-06-28 08:53:48 -07:00
Sylvain ad12bb4fd1 Remove hints that weren't used anymore ! 2023-06-28 06:22:20 -07:00
Anonymous Maarten 7751bfdbf3 cmake: create wiki dir before running wikiheaders.pl --copy-to-wiki 2023-06-28 14:41:31 +02:00
Sam Lantinga 0f4679102c Fixed pedantic warning: comma at end of enumerator list
Fixes https://github.com/libsdl-org/SDL/issues/7878
2023-06-27 21:52:33 -07:00
Sam Lantinga cc5e9ffe70 Don't crash if SDL_MapRGB() and SDL_MapRGBA() are passed a NULL format 2023-06-27 16:08:19 -07:00
Sylvain 600c615529 Fixed bug #7821 - docs/README-migration.md function name typos 2023-06-27 20:10:47 +02:00
Anonymous Maarten afdd448834 cmake: don't install sdlmanpages.cmake 2023-06-27 19:02:44 +02:00
Sam Lantinga 9ee1200e6f Fixed Nintendo Switch Pro controllers that don't have readable user calibration 2023-06-27 07:48:42 -07:00
Sam Lantinga c065a9b128 Fix some issues caught by check_stdlib_usage.py 2023-06-27 06:19:06 -07:00
Anonymous Maarten e8d2ccbc1c ci: reduce amount of files to copy back from freebsd vm
This should reduce the chance on an error during copy back
2023-06-27 13:59:15 +02:00
Anonymous Maarten 1061a978c3 cmake: fix header GLOB used for generating man pages 2023-06-27 13:49:50 +02:00
Sylvain 70ccf34587 Script to detect use of stdlib function 2023-06-27 04:47:08 -07:00
Anonymous Maarten 937f5d0059 cmake: allow man page installation by SDL satellite libraries
This is done by installing the wikiheaders.pl script, and add a wrapping cmake function.
2023-06-27 03:00:19 +02:00
Frank Praznik 9ab2025127 wayland: Don't initialize OpenGL when the window flags didn't specify it
Applications that don't specify a rendering flag are likely handling Vulkan/GL themselves, so SDL loading OpenGL by default in this case is unnecessary overhead, and if a render backend requires it, the window will be recreated with the appropriate flags when the renderer is initialized.
2023-06-26 13:57:48 -04:00
Narr the Reg 425062c123 hidapi: switch: Handle MCU input reports 2023-06-26 10:01:49 -07:00
Ozkan Sezer 02398a8f11 Allow building against old Linux kernels. 2023-06-26 18:01:50 +03:00
Sam Lantinga fd062657dd Fixed build 2023-06-26 07:43:44 -07:00
meyraud705 6cc21af900 Don't keep sensor file open while sensors are disabled 2023-06-26 07:32:40 -07:00
meyraud705 9cfac88054 Improve sensor detection for Linux gamepad 2023-06-26 07:32:40 -07:00
meyraud705 000277060c Add support for sensor to joystick on Linux (evdev) 2023-06-26 07:32:40 -07:00
Sylvain 95727b5c7d use of SDL functions 2023-06-25 15:50:23 -07:00
Sam Lantinga 87e916dd21 SDL_FindFreePlayerIndex() will always return the next available player index
Fixes https://github.com/libsdl-org/SDL/issues/7868
2023-06-24 15:38:38 -07:00
Sam Lantinga 267fdd7daa Removed Bluetooth connection detection now that we get it from hidapi 2023-06-23 15:50:07 -07:00