Sam Lantinga
9bfd0d901c
Audio device IDs are unsigned
2024-07-22 05:48:01 -07:00
Sam Lantinga
033c9c5951
Added SDL_CopyFile() and SDL_CopyStorageFile()
...
Fixes https://github.com/libsdl-org/SDL/issues/9553
2024-07-21 19:58:23 -07:00
Sam Lantinga
128df75e05
Fixed potential NULL dereference
2024-07-21 14:32:19 -07:00
Sam Lantinga
bd27b89903
Prevent potential overflow in rectangle functions
...
We're limiting the functions to rects with positions and sizes < 1 billion for speed, which is totally fine for most SDL use cases. If you need rectangles larger than that, you can roll your own functions that use 64-bit intermediate values and do proper overflow handling of output values.
Fixes https://github.com/libsdl-org/SDL/issues/8879
2024-07-21 13:04:11 -07:00
Anonymous Maarten
22bfbdbc02
stdinc: c23 deprecated _Static_assert in favor of static_assert
2024-07-21 21:51:55 +03:00
Sam Lantinga
4830fc4e40
Added more 8-bit blit test coverage
2024-07-21 11:39:38 -07:00
Sam Lantinga
bab982f2e0
Don't recalculate the blit mapping when changing surfaces
...
We don't actually need to change the blit mapping if we're targeting a new surface with the same format and palette.
2024-07-21 11:39:38 -07:00
Dragon-Baroque
68cabc2837
Support SDL_EVENT_DROP_TEXT in Cocoa
...
src/video/cocoa/SDL_cocoawindow.m
Support Copy in addition to Generic as Drag and Drop operation,
Register and Support public.utf8-plain-text for SDL_EVENT_DROP_TEXT.
2024-07-21 11:17:04 -07:00
Sam Lantinga
c040a02d6c
Removed SDL_PROP_SURFACE_COLORSPACE_NUMBER
...
Now that we have surface internal data, we can store it there. This slightly improves performance in the surface blitting paths.
2024-07-21 09:36:22 -07:00
SDL Wiki Bot
4a7e95402f
Sync SDL3 wiki -> header
2024-07-21 15:09:24 +00:00
Sam Lantinga
e0fd59de64
Fixed floating point rectangles to be mathematically correct.
...
* A floating point rectangle contains all points >= x and <= x + w
* A floating point rectangle is only empty if it has negative width. The zero rectangle contains the zero point.
* Adjacent floating point rectangles intersect along their shared side
Fixes https://github.com/libsdl-org/SDL/issues/6791
2024-07-21 08:08:15 -07:00
Sam Lantinga
9e978740c3
Removed unnecessary casts
2024-07-21 08:08:15 -07:00
Sam Lantinga
35ae56d344
Switched the rectangle tests to listing by name instead of by number.
2024-07-21 08:08:15 -07:00
Sam Lantinga
f244f08165
Fixed building with SDL_VIDEO_OPENGL_WGL disabled (thanks @Please-just-dont!)
...
Fixes https://github.com/libsdl-org/SDL/issues/10330
2024-07-20 21:24:02 -07:00
Sam Lantinga
78991bdb13
Revert "SDL_BlitSurfaceUnchecked() should invalidate the map when switching from scaled to unscaled blits"
...
This reverts commit 1f3b2fc8b3
.
SDL_BlitSurface() also handles scaling, so we shouldn't clear the scaling flag inside of it.
2024-07-20 21:17:15 -07:00
Sam Lantinga
b0a6afaa35
Updated documentation for SDL_GetPreferredLocales()
2024-07-20 20:12:55 -07:00
Sam Lantinga
bce6d5b421
Actually, we still need size overflow checking in SDL_BlitSurfaceUncheckedScaled()
2024-07-20 18:53:31 -07:00
Sam Lantinga
9bdb3e8b6a
Moved some error checking out of SDL_BlitSurfaceUncheckedScaled()
2024-07-20 18:51:42 -07:00
Sam Lantinga
1f3b2fc8b3
SDL_BlitSurfaceUnchecked() should invalidate the map when switching from scaled to unscaled blits
2024-07-20 18:44:23 -07:00
SDL Wiki Bot
979c71b18b
Sync SDL3 wiki -> header
2024-07-21 01:22:39 +00:00
Sam Lantinga
6209c71f54
Added SDL_BlitSurface9Grid() and SDL_RenderTexture9Grid()
2024-07-20 18:21:19 -07:00
Sam Lantinga
9294476788
Added SDL_WriteSurfacePixel() and SDL_WriteSurfacePixelFloat()
2024-07-20 18:21:19 -07:00
Sam Lantinga
12e50d17a2
Removed SDL_SoftStretch() from the public API
...
SDL_BlitSurfaceScaled() is more flexible and uses the SDL_SoftStretch() fast path when possible. Having two surface scaling APIs was confusing, especially when one of them has unexpected limitations.
2024-07-20 18:21:19 -07:00
Sam Lantinga
5ce81ebcc9
Corrected blit colorkey documentation
...
Fixes https://github.com/libsdl-org/sdlwiki/issues/576
2024-07-20 18:21:19 -07:00
Sam Lantinga
67fa7a9138
SDL_BlitSurface() and SDL_BlitSurfaceScaled() now have a const dstrect parameter
...
This was originally to avoid duplicating clipping work in Maelstrom on a 486 computer. This has been confusing for users and computers are a little faster these days, so we'll make it work the way people expect.
2024-07-20 18:21:19 -07:00
Sam Lantinga
198caa54a1
Added SDL_RenderTextureTiled()
2024-07-20 18:21:19 -07:00
Sam Lantinga
9e55ee9391
Added SDL_BlitSurfaceTiledWithScale()
2024-07-20 18:21:19 -07:00
Sam Lantinga
f47ddbf1ac
Added SDL_BlitSurfaceTiled()
...
Fixes https://gamedev.stackexchange.com/questions/136792/is-there-a-way-to-set-texture-wrap-mode-as-repeat-in-sdl-2
2024-07-20 18:21:19 -07:00
Sam Lantinga
71d2662a39
Fixed warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
2024-07-20 11:50:27 -07:00
Sam Lantinga
03bb2c17ed
Enable texture wrapping for SDL_RenderGeometry()
...
Currently wrapping is based on whether texture coordinates are outside of [0,1], but the code is structured so it's easy to add an API to set it and add additional wrapping modes if we want.
Fixes https://github.com/libsdl-org/SDL/issues/9238
Closes https://github.com/libsdl-org/SDL/pull/5369
2024-07-20 09:51:05 -07:00
Frank Praznik
6a74ade73d
Make SDL_URIToLocal available to multiple platforms
...
Moves the functions out of core/unix into SDL_utils.c
2024-07-20 12:39:18 -04:00
hwsmm
6a62c54b93
Remove a duplicate definition that is already in SDL_guid.h
2024-07-20 12:23:50 +03:00
Ryan C. Gordon
e1aa995732
audio: recording devices also need to update their streams' channel maps.
2024-07-19 20:37:05 -04:00
Ryan C. Gordon
068c785491
audio: Assigning a device channel map to an audio stream was quietly failing.
...
Fixes #10317 .
2024-07-19 20:37:05 -04:00
Anonymous Maarten
6d39c18dd3
ci: test the MSVC development archive for targeting arm64ec
2024-07-20 00:59:58 +02:00
Anonymous Maarten
476b987f1b
intrinsics: avx, avx2 and avx512f are (currently) unsupported on arm64ec
2024-07-20 00:59:58 +02:00
Anonymous Maarten
b3b74e8aed
Fix SDL3ConfigVersion.cmake of VC development package for ARM64EC
2024-07-20 00:59:58 +02:00
Sam Lantinga
aafbbe4ebc
Fixed warning C4090: 'function': different 'const' qualifiers
2024-07-19 15:38:41 -07:00
Sam Lantinga
64cb431ead
Updated migration documentation for functions that now return temporary memory
2024-07-19 14:45:47 -07:00
Sam Lantinga
f0a839b9b7
Removed SDL 2.1 note, we're not going to revisit this for SDL 3.0
...
Closes https://github.com/libsdl-org/SDL/issues/9480
2024-07-19 13:39:22 -07:00
Anonymous Maarten
cc47969a79
cmake: actually check ARM64EC
2024-07-19 22:24:44 +02:00
SDL Wiki Bot
fc8cd657a5
Sync SDL3 wiki -> header
2024-07-19 20:08:05 +00:00
Sam Lantinga
02dceed760
Simpler pointer arithmetic
2024-07-19 13:06:54 -07:00
Sam Lantinga
b80784fced
SDL_GetGamepadBindings() follows the SDL_GetStringRule
2024-07-19 13:06:54 -07:00
Sam Lantinga
93db5ef135
Fixed documentation for SDL_GlobDirectory()
2024-07-19 13:06:54 -07:00
Sam Lantinga
0079b6d45f
SDL_GetTouchFingers() follows the SDL_GetStringRule
2024-07-19 13:06:54 -07:00
SDL Wiki Bot
975457cfb6
Sync SDL3 wiki -> header
2024-07-19 19:23:24 +00:00
Sam Lantinga
a340de6196
The candidates in SDL_EVENT_TEXT_EDITING_CANDIDATES should be a single allocation
2024-07-19 12:22:03 -07:00
Sam Lantinga
bebde1c4c9
Make sure we're not trying to add temporary memory twice
2024-07-19 12:22:03 -07:00
Sam Lantinga
71a60d4c0e
Updated documentation for functions that return temporary memory
2024-07-19 12:22:03 -07:00