Commit Graph

333 Commits (022ff075b9a0ae837f4489a5ed68a4e769b1ca98)

Author SHA1 Message Date
Sam Lantinga 5b3ee51c6c Updated copyright for 2024 2024-01-01 13:15:26 -08:00
Sylvain ffd82fb7c4 Add scaleMode to SDL_SoftStretch(), remove SDL_SoftStretchLinear(). 2023-12-22 09:13:21 -08:00
Sylvain 5dba04b29b Remove SDL_{Set,Get}SurfaceScale().
Add Scale parameter to SDL_BlitSurfaceScaled() and SDL_BlitSurfaceScaledUnchecked()
(see #8732)
2023-12-22 02:08:49 -08:00
Sam Lantinga 4bb5e1f0f9 Added migration notes for migrating Steam Input support from SDL2 to SDL3 2023-12-20 14:15:09 -08:00
Ryan C. Gordon df0fd55891
wikiheaders.pl: README files are no longer in Windows endline format. 2023-11-30 10:10:04 -05:00
Ryan C. Gordon dd47da8a5c gamepad: Replace GetNumMappings/GetMappingByIndex with a single function.
Now it returns an array and optional count, to match other SDL3 APIs.
2023-11-29 20:50:44 -05:00
Ryan C. Gordon dfee3f9e92 render: Replaced SDL_RenderFlush with SDL_FlushRenderer.
This uses the same `SDL_VerbNoun` format as the rest of SDL3, and also
adds stronger effort to invalidate cached state in the backend, so cooperation
improves with apps that are using lowlevel rendering APIs directly.

Fixes #367.
2023-11-29 14:24:26 -05:00
Ryan C. Gordon 869257a5c1
SDL_migration.cocci: Added a thing for SDL_Vulkan_CreateSurface. 2023-11-06 19:16:38 -05:00
Sam Lantinga c2a3112b6f Added "--substring" to the help for rename_symbols.py 2023-10-23 09:14:54 -07:00
Ryan C. Gordon 9d7c57234a
audio: Cleaned out most remaining `/* */` comments for `//` style.
Fully committing to it...!

This left SDL_wave.* alone for now, since there's a ton of comments in there
and this code hasn't changed much from SDL2 so far. But as SDL2 ages out a
little more, I'll likely switch this over, too.
2023-10-18 15:39:01 -04:00
Sam Lantinga 4368f70ff9 Added properties to various SDL objects
The following objects now have properties that can be user modified:
* SDL_AudioStream
* SDL_Gamepad
* SDL_Joystick
* SDL_RWops
* SDL_Renderer
* SDL_Sensor
* SDL_Surface
* SDL_Texture
* SDL_Window
2023-10-11 22:38:00 -07:00
Ryan C. Gordon 8745a9949b
add-source-to-projects.pl: Fix adding files in the base src dir. 2023-10-09 19:19:01 -04:00
Ryan C. Gordon 399bc709b7
build-scripts.pl: Added add-source-to-projects.pl
This insert files to the Xcode and Visual Studio projects, so you can add
sources to the build without having to find a Mac or Windows machine with
the appropriate tools installed, and manually update four different sets of
projects across them.

This doesn't touch CMake, but you can add files to that with a text editor
(hopefully) without drama.

This, like all Perl code, is fragile. Report bugs and don't push it too hard.
2023-09-22 23:08:46 -04:00
Sam Lantinga 859dc14add Replaced SDL_GetGamepadBindForAxis() and SDL_GetGamepadBindForButton() with SDL_GetGamepadBindings() 2023-09-13 23:01:28 -07:00
Ryan C. Gordon ce27363df2
wikiheaders: Sort undocumented functions.
Otherwise they appear in random order, which isn't ideal in general, but
also this breaks the wiki/header bridge because it can't produce identical
conversions per-run.
2023-09-12 09:58:10 -04:00
Anonymous Maarten b00cbd76aa wikiheaders.pl: create Unsupported.md file with list of functions undocumented in either the headers or the wiki 2023-09-06 15:51:08 -04:00
Anonymous Maarten e85206ffd8 wikiheaders.pl: add --rev= option to pass revision string
This way, git is not required anymore to calculate the git revision
2023-09-04 18:56:00 +02:00
Sam Lantinga 233789b0d1 Audio types have the same naming convention as other SDL endian types, e.g. [S|U][BITS][LE|BE]
Native endian types have no LE/BE suffix
2023-09-04 09:48:44 -07:00
Brick 6a73f74b6b Rebuild full ResamplerFilter (left wing + right wing) at runtime 2023-08-25 08:43:56 -04:00
Brick fba6e1e3d3 Removed ResamplerFilterDifference
It takes 1 extra multiply to calculate the correct interpolation,
but I think the improvement in cache locality (and binary size) outweighs that.
2023-08-25 08:43:56 -04:00
Brick 47fea7f06b Used fixed-point arithmetic in ResampleAudio 2023-08-21 16:02:54 -04:00
Brick b9541b9eab Improved ResampleAudio
* filterindex2 was off-by-one
* Generate ResamplerFilter using doubles
* Transpose ResamplerFilter to improve access patterns
2023-08-21 16:02:54 -04:00
Simon McVittie efe15588d5 Relabel back paddles as left or right
The sequence order of the four paddles is not obvious, with SDL and Xbox
controllers swapping the order of P2 and P3 relative to each other.
If we group them into left and right, then it becomes more obvious.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-08-09 11:03:30 -07:00
Sam Lantinga b903ccf945 SDL_rwops read/write functions return size_t again
The current status is stored in the SDL_rwops 'status' field to be able to determine whether a 0 return value is caused by end of file, an error, or a non-blocking source not being ready.

The functions to read sized datatypes now return SDL_bool so you can detect read errors.

Fixes https://github.com/libsdl-org/SDL/issues/6729
2023-08-07 20:36:21 -07:00
Ryan C. Gordon e7d56dd0b2
audio: Renamed new API SDL_UnpauseAudioDevice to SDL_ResumeAudioDevice. 2023-08-05 19:20:14 -04:00
Ryan C. Gordon 6567285eae
SDL_migration.cocci: Fix up SDL_(Pause|Unpause)Audio. 2023-07-30 11:56:37 -04:00
luzpaz 65e1d568ef Fix various typos (docs/build scripts/tests) 2023-07-03 08:35:37 -07: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
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
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 c065a9b128 Fix some issues caught by check_stdlib_usage.py 2023-06-27 06:19:06 -07:00
Sylvain 70ccf34587 Script to detect use of stdlib function 2023-06-27 04:47:08 -07:00
Sam Lantinga 808d83dd67 Allow specifying APP_PLATFORM and APP_ABI on the command line 2023-06-21 13:49:09 -07:00
Sam Lantinga 8cf5dc9963 Build on Android targeting the arm64-v8a architecture by default
This speeds up iteration time and covers most customer devices
2023-06-20 09:18:19 -07:00
Sam Lantinga e6d1ba2a17 Added the concept of display natural orientation
Also renamed SDL_GetDisplayOrientation() SDL_GetDisplayCurrentOrientation()

The natural orientation of the primary display is the frame of reference for accelerometer and gyro sensor readings.
2023-06-17 07:42:16 -07:00
Sam Lantinga cb73bed6eb SDL API renaming: SDL TLS functions
Fixes https://github.com/libsdl-org/SDL/issues/7743
2023-05-26 08:33:15 -07:00
Sam Lantinga e61b5ceefe The SDL_WINDOW_ALLOW_HIGHDPI flag has been renamed SDL_WINDOW_HIGH_PIXEL_DENSITY 2023-05-18 07:34:45 -07:00
Sam Lantinga c699f3d1d8 Updated SDL high DPI support
We have gotten feedback that abstracting the coordinate system based on the display scale is unexpected and it is difficult to adapt existing applications to the proposed API.

The new approach is to provide the coordinate systems that people expect, but provide additional information that will help applications properly handle high DPI situations.

The concepts needed for high DPI support are documented in README-highdpi.md. An example of automatically adapting the content to display scale changes can be found in SDL_test_common.c, where auto_scale_content is checked.

Also, the SDL_WINDOW_ALLOW_HIGHDPI window flag has been replaced by the SDL_HINT_VIDEO_ENABLE_HIGH_PIXEL_DENSITY hint.

Fixes https://github.com/libsdl-org/SDL/issues/7709
2023-05-17 12:58:00 -07:00
Sam Lantinga 9b87de258f Fixed crash in new audio channel conversion code
Each loop needs to be run num_frames times, and the source and destination pointers are incremented by the number of channels during the conversion.
2023-05-04 15:50:38 -07:00
Brick 079ae065f1 Added SDL prefix AUDIO_* constants 2023-05-02 08:09:06 -07:00
Sam Lantinga 87ad71f9b2 Rename SDL mutex, semaphore and condition variable types to match SDL 3.0 naming convention 2023-04-28 12:08:33 -07:00
Sam Lantinga 61c0c009ab Rename SDL semaphore and condition variable functions to match SDL 3.0 naming convention
Fixes https://github.com/libsdl-org/SDL/issues/7642
2023-04-28 12:08:33 -07:00
Ryan C. Gordon e5a6c24c82 audio: Redesigned audio conversion code for SDL3.
- SDL_AudioCVT is gone, even internally.
- libsamplerate is gone (I suspect our resampler is finally Good Enough).
- Cleanups and improvements to audio conversion interfaces.
- SDL_AudioStream can change its input/output format/rate/channels on the fly!
2023-04-27 18:35:15 -04:00
Sam Lantinga 2aa2fa5449 Added SDL_CreateWindowWithPosition()
It turns out there's a race condition on X11 where the window could be placed by the window manager while being placed by the application, so we need to have the initial position available at window creation.
2023-03-31 17:21:44 -07:00
Elad Lahav eca7b8e4a1 Do not look at local headers when determining features
Avoids the detection of X11 on the build machine
2023-03-27 15:33:08 -07:00
Elad Lahav 4b17cc3a46 Add CMake toolchain files 2023-03-27 15:33:08 -07:00
Sam Lantinga 1f095b9ce6 Fixed wikiheaders.pl with perl-5.10.1 (thanks @sezero!) 2023-03-24 13:57:24 -07:00
Ryan C. Gordon 586004e52a
wikiheaders.pl: Manpages shouldn't use .BI sections, it looks bad.
Reference Issue #7514.
2023-03-21 22:23:06 -07:00
Ryan C. Gordon 1b81ececd3
wikiheaders.pl: Fixed uninitialized value warning when run without arguments. 2023-03-21 21:57:12 -07:00
Anonymous Maarten 77b8edb5ad wikiheaders.pl: add --manpath argument 2023-03-21 02:19:19 +01:00