In SDL3 we plan to make more use of shaders in the 2D render API, and this minimizes the number of platforms we have to consider for new features. OpenGL ES 2.0 or newer is supported on all modern iOS and Android devices.
I updated .clang-format and ran clang-format 14 over the src and test directories to standardize the code base.
In general I let clang-format have it's way, and added markup to prevent formatting of code that would break or be completely unreadable if formatted.
The script I ran for the src directory is added as build-scripts/clang-format-src.sh
This fixes:
#6592#6593#6594
The new protocol adds support for more native communication of
fractional scaling.
Everything in the wayland backend already existed only our fractional
scale was calculated implicitly through a combination of output size
guesswork for fullscreen windows.
This new protocol makes that explicit, providing a more robust solution
and a solution for non-fullscreen surfaces. The fallback code is still
left in place for now whilst compositors gain support.
We just build libSDL3.dylib instead of libSDL3.0.0.0.dylib with symlinks
Fixed the compatiblity vs current version, e.g.
SDL 3.20.87
@rpath/libSDL3.0.dylib (compatibility version 2001.0.0, current version 2001.87.0)
SDL 3.21.5
@rpath/libSDL3.dylib (compatibility version 2106.0.0, current version 2106.0.0)
- do not overwrite error message set by SDL_InitFormat (SDL_AllocFormat)
- set proper error message (Cocoa_Metal_CreateView)
- protect against allocation failure (UIKit_Metal_CreateView)
* Remove depth field from SDL_CreateRGBSurfaceWithFormat and SDL_CreateRGBSurfaceWithFormatFrom
* Removed unused 'flags' parameter from SDL_CreateRGBSurface and SDL_CreateRGBSurfaceWithFormat
* Removed unused 'flags' parameter from SDL_ConvertSurface and SDL_ConvertSurfaceFormat
This behavior more closely matches other platform where the window is borderless but still interacts with the window manager (e.g. task bar shows above it, it can be resized to fit within usable desktop area, etc.)
If you want a borderless window the size of the desktop that looks like a fullscreen window, then you should use the SDL_WINDOW_FULLSCREEN_DESKTOP flag.
Fixes https://github.com/libsdl-org/SDL/issues/6659
`argv[0]`/`getexexname()` are not always absolute paths by default and can be modified to anything the developer wants them to be.
Consider using `readSymLink("/proc/self/path/a.out")` instead and `getexecname()` as the fallback, since the symlink will always be the correct absolute path (unless /proc is ot mounted, but it is by default on Solaris and Illumos platforms).
While 78f97108f9 reduced the accumulation error, it was still big enough to cause distortions.
Fixes#6196.
(cherry picked from commit 8145212103264b04c20cdb50b430f3c99b44e9b4)