Maia
01c9c1d0eb
Document main callbacks API thread safety
2024-10-12 20:13:30 -04:00
Cameron Cawley
aebb64efa1
Remove leftover ARM SIMD code
2024-10-12 11:13:37 -07:00
Semphris
05c53b5ab0
Add macro guards for OpenGL <=1.3 function prototypes
...
- `#define SDL_OPENGL_1_NO_PROTOTYPES` to hide function prototypes
- `#define SDL_OPENGL_1_FUNCTION_TYPEDEFS` to add PFNGL*PROC function types
2024-10-12 11:21:07 -04:00
SDL Wiki Bot
365dba6de8
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-12 15:08:54 +00:00
Daniel Gibson
33366b0a4e
Fix SDL_MAIN_USE_CALLBACKS with Android, introduce SDL_MAIN_EXPORTED
...
My simplification of the conditions for including SDL_main_impl.h
had one problem: I forgot that SDL_main_impl.h must be included
even on Android when SDL_MAIN_USE_CALLBACKS is used, because then a
SDL_main() function that makes sure the callbacks get called is needed,
and that function is implemented in SDL_main_impl.h
But OTOH, even when SDL_MAIN_USE_CALLBACKS is used, SDL_main_impl.h
should not implement a standard `int main(...)` function on Android
(because there the SDL-using native code is compiled as a library and
the entry point is in SDLActivity.java, which calls SDL_main()
in said library).
So the check for platforms that don't have *any* native main function
but just SDL_main() called from the outside should be handled in
SDL_main_impl.h, so both the normal and the callback case can avoid
generating a standard main() in the same way.
To do this, SDL_MAIN_EXPORTED is defined for platforms like Android,
where the real entry point (main() function) is outside of the code
that uses SDL, so
- SDL_main() must be visibly exported with SDL_DECLSPEC, so the outside
code can call it
- SDL_main_impl.h must not implement a "real" main() function
Another small change based on this is defining SDLMAIN_DECLSPEC
at a more general place.
If another platform like Android (where the entry point is somewhere
else entirely, possibly implemented in a different programming language)
turns up, defining SDL_MAIN_NEEDED (so the users main() is renamed
to SDL_main()) and SDL_MAIN_EXPORTED should be all that's needed on the
SDL_main.h side - and if not then at least the implementation is
cleaner and clearer now, IMHO.
fixes #11162
2024-10-11 18:54:29 -07:00
Andrei Rafael Brongel
86ef790a23
explicit cast to int in SDL_bits
2024-10-11 18:52:06 -07:00
Petar Popovic
3086b25c4e
Set hint SDL_HINT_MAC_SCROLL_MOMENTUM version to SDL 3.1.4.
2024-10-11 17:33:52 -07:00
SDL Wiki Bot
e31c68427a
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-10 23:35:37 +00:00
Evan Hemsley
6ea4a66451
GPU: Add SDL_CalculateGPUTextureFormatSize ( #11146 )
...
---------
Co-authored-by: Sam Lantinga <slouken@libsdl.org>
2024-10-10 16:34:38 -07:00
Petar Popovic
6d85127560
Rename hint string literal SDL_HINT_MAC_SCROLL_MOMENTUM
2024-10-10 16:16:36 -07:00
SDL Wiki Bot
8aaaeb7560
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-10 17:02:43 +00:00
SDL Wiki Bot
2a9cb68b91
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-10 16:43:29 +00:00
SDL Wiki Bot
e4b1a9f382
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-10 15:24:38 +00:00
SDL Wiki Bot
ac6b9e2d19
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-10 15:06:56 +00:00
Sam Lantinga
c8f5f6d47a
Added SDL_DelayPrecise()
...
SDL_DelayNS() now passes through to the high precision OS delay function, and SDL_DelayPrecise() tries to busy wait to get as close as possible to the desired wait time.
Fixes https://github.com/libsdl-org/SDL/issues/11141
2024-10-10 08:06:18 -07:00
Sam Lantinga
28a70a5b71
Use the correct version for the \since field
2024-10-10 08:06:18 -07:00
SDL Wiki Bot
4707bb730e
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-10 00:32:39 +00:00
Sam Lantinga
ee9b6204cf
Updated to version 3.1.5 for development
...
We should bump the version immediately before and after release so the release version corresponds to a fixed snapshot of code.
2024-10-09 11:02:01 -07:00
SDL Wiki Bot
02f3a96476
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-09 16:49:57 +00:00
Sam Lantinga
f8eac30276
Added SDL_StepBackUTF8()
2024-10-09 09:49:10 -07:00
Daniel Ludwig
5b6342a00d
Default SDL_HINT_JOYSTICK_GAMEINPUT to "1" on GDK platforms
2024-10-09 07:30:13 -07:00
Delta
8e6ead2f7b
[GPU] Added ASTC texture format support ( #11116 )
2024-10-08 18:45:04 -04:00
Ryan C. Gordon
02434cd293
emscripten: Fixes for data addresses above 2gb
...
This includes both wasm64 and wasm32 when addressing more than 2gb of memory.
Fixes : #9052
(Manually cherry-picked from 3deb07ea395373204462130c1e062bc1f71fe060.)
2024-10-08 17:41:18 -04:00
Sam Lantinga
c34790f9f1
Fixed spacing
2024-10-08 11:49:08 -07:00
Daniel Gibson
312ecc4a52
SDL_main.h: Remove dead code for hypothetical C++ platforms
...
If WinRT returns after all, or a similarly bad platforms turns up,
the code can still be found in the git history.
But keep in mind that it then will have to be added *before* the
#if ( defined(SDL_MAIN_USE_CALLBACKS) || defined(SDL_MAIN_NEEDED) ...
case for platforms that support plain C to work correctly
2024-10-08 11:47:33 -07:00
Daniel Gibson
823b218051
Simplify code to include SDL_main_impl.h in SDL_main.h
...
Basically all platforms where SDL_main.h renames main() to SDL_main()
use the platform-specific main() (or WinMain() or whatever)
implementations in SDL_main_impl.h - and that renaming is enabled with:
#if defined(SDL_MAIN_NEEDED) || defined(SDL_MAIN_AVAILABLE) \
|| defined(SDL_MAIN_USE_CALLBACKS)
#define main SDL_main
#endif
The only exception is Android, where main() *is* renamed, but
SDL_main_impl.h isn't used, because SDL_main() is called from Java.
So I think it's cleaner and less error-prone (for adding additional
platforms that need SDL_main() in the future), to use the same check
for including SDL_main_impl.h as is used for `#define main SDL_main`
and only list the exceptions (currently Android) there explicitly.
If new platforms like Android turn up, they can easily be added there
by inserting "|| defined(SDL_PLATFORM_WEIRDPLATFORM)" right next
to the Android check.
See also https://github.com/libsdl-org/SDL/issues/11068#issuecomment-2399907535
2024-10-08 11:47:33 -07:00
SDL Wiki Bot
d9f8474dd7
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-08 17:38:17 +00:00
SDL Wiki Bot
95aaaa3232
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-08 17:06:41 +00:00
Frank Praznik
158ba93d61
Update some window function documentation
...
Updates some documentation to correspond with changes made since it was originally written, clarifies some function behavior, and includes some assorted typo fixes.
2024-10-08 13:05:20 -04:00
SDL Wiki Bot
7acfdfd3e7
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-08 16:50:41 +00:00
SDL Wiki Bot
326ab439d7
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-08 15:09:24 +00:00
Sam Lantinga
fb07ab91c6
Improved SDL_main documentation and remove extern "C" comment.
...
It turns out that this is incorrect and any C linkage is already taken care of by SDL when redefining SDL_main.
Fixes https://github.com/libsdl-org/SDL/issues/11068
2024-10-08 08:07:54 -07:00
SDL Wiki Bot
03fa9ff0b0
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-08 13:59:10 +00:00
Sam Lantinga
f6fa617139
Define SDL_DIALOG_DUMMY in SDL_build_config.h as needed
2024-10-07 19:52:50 -07:00
Sam Lantinga
4627283eca
Allow building both Cocoa and dummy dialog implementations
...
This allows us to remove platformFilters from the Xcode project, which is not supported in Xcode 12.
2024-10-07 18:01:39 -07:00
Frank Praznik
2fd12b2e8a
keyboard: Note that enabling text input can also enable an IME
...
An active IME can potentially eat key events, particularly dead keys and parts of a compose sequence, so note this behavior in the documentation.
2024-10-07 19:21:34 -04:00
Naman Dixit
54e622c2e6
Use the printf vararg verification macros when compiling with clang
2024-10-06 22:19:52 -07:00
SDL Wiki Bot
d0ef58b442
Sync SDL3 wiki -> header
...
[ci skip]
2024-10-06 23:03:29 +00:00
SDL Wiki Bot
cbb9a16367
Sync SDL3 wiki -> header
...
'[ci skip]'
2024-10-06 22:58:06 +00:00
Jan Sedivy
bf54eddba9
macOS: Clarify when macOS hints need to be set
2024-10-06 12:36:42 -07:00
Jan Sedivy
c2b98e21ba
macOS: Add hint for smooth SDL_EVENT_MOUSE_WHEEL values
2024-10-06 12:36:42 -07:00
SDL Wiki Bot
e59078ac6f
Sync SDL3 wiki -> header
2024-10-06 18:31:17 +00:00
Ryan C. Gordon
9e74ada7b8
gpu: fixed formatting in docs.
2024-10-06 14:30:07 -04:00
Frank Praznik
c9ffa3f9e1
Remove vestiges of the TAKE_FOCUS window event
...
The event was removed, so remove the rename define and update the coccinelle script.
2024-10-06 10:02:53 -04:00
David Fort
e00b1fdd67
clipboard: include mime types in SDL_ClipboarUpdate
...
This patch modifies the clipboard handling so that when we receive an external
clipboard update, the suppported mime types are included in the SDL_ClipboarUpdate
event. The patch also introduces the owner field that allows to know if the update
is because we own the clipboard (internal update) or if it was an external update.
2024-10-05 18:19:10 -07:00
Sam Lantinga
b8e72b0969
Note that creating a renderer will fail if the preferred renderer isn't available.
...
Fixes https://github.com/libsdl-org/SDL/issues/11077
2024-10-05 09:55:26 -07:00
zshoals
1ca45c5891
Fix typo: DiretMedia->DirectMedia
2024-10-05 00:08:01 -04:00
Ryan C. Gordon
8c3f88b495
docs: Wrote CategoryVulkan.
2024-10-04 16:55:50 -04:00
SDL Wiki Bot
369b93771b
Sync SDL3 wiki -> header
2024-10-04 20:38:03 +00:00
SDL Wiki Bot
deeffaa8d6
Sync SDL3 wiki -> header
2024-10-04 20:36:26 +00:00
Ryan C. Gordon
84ecf7fd3e
docs: Add CategorySurface text.
2024-10-04 16:35:49 -04:00
SDL Wiki Bot
e292d1f5ac
Sync SDL3 wiki -> header
2024-10-04 20:27:58 +00:00
Sam Lantinga
d5af0c7e09
Added missing parentheses
2024-10-04 13:27:13 -07:00
SDL Wiki Bot
5a60d073c0
Sync SDL3 wiki -> header
2024-10-04 20:24:40 +00:00
SDL Wiki Bot
a3413e050b
Sync SDL3 wiki -> header
2024-10-04 20:23:29 +00:00
Ryan C. Gordon
c25423b94c
docs: Filled in some category pages.
2024-10-04 16:22:00 -04:00
Sam Lantinga
a57ecad648
Fixed documentation typos
2024-10-04 13:04:27 -07:00
SDL Wiki Bot
37315110c1
Sync SDL3 wiki -> header
2024-10-04 19:50:14 +00:00
Anonymous Maarten
f26dd52090
SDL_GetProcessProperties is missing a SDLCALL
2024-10-04 21:48:27 +02:00
SDL Wiki Bot
64cbf02dbf
Sync SDL3 wiki -> header
2024-10-04 19:35:00 +00:00
Ryan C. Gordon
ffe4e571d1
wikiheaders: regex hack to make a URL not confuse wikilink genertion.
2024-10-04 15:34:18 -04:00
SDL Wiki Bot
a7e4e9219a
Sync SDL3 wiki -> header
2024-10-04 19:29:06 +00:00
cosmonaut
e8c852d77c
GPU: re-add parens to wiki intro
2024-10-04 12:28:05 -07:00
SDL Wiki Bot
f592a35439
Sync SDL3 wiki -> header
2024-10-04 18:32:44 +00:00
cosmonaut
12d007038c
GPU: wiki header link typo
2024-10-04 11:31:52 -07:00
SDL Wiki Bot
f275731e18
Sync SDL3 wiki -> header
2024-10-04 18:30:06 +00:00
cosmonaut
f3285b01c8
GPU: Intro fixes
2024-10-04 11:29:27 -07:00
SDL Wiki Bot
93c7521dd5
Sync SDL3 wiki -> header
2024-10-04 18:22:19 +00:00
Evan Hemsley
c1084bfaa3
GPU Introduction ( #11062 )
2024-10-04 11:21:36 -07:00
cosmonaut
21e7fa45e8
GPU: fix padding field typo
2024-10-04 10:45:47 -07:00
SDL Wiki Bot
f859d69c44
Sync SDL3 wiki -> header
2024-10-04 16:14:38 +00:00
Sam Lantinga
6c64c62114
Rename SDL_BUTTON() to SDL_BUTTON_MASK()
...
Fixes https://github.com/libsdl-org/SDL/issues/11056
2024-10-04 09:13:59 -07:00
SDL Wiki Bot
d529407ce7
Sync SDL3 wiki -> header
2024-10-04 15:58:03 +00:00
Sam Lantinga
fe2880fcda
Rename SDL_SetThreadPriority() to SDL_SetCurrentThreadPriority()
...
Fixes https://github.com/libsdl-org/SDL/issues/11055
2024-10-04 08:57:03 -07:00
Sam Lantinga
43e7ce7dfc
Updated to version 3.1.3 for the preview release
2024-10-03 23:01:55 -07:00
SDL Wiki Bot
ca0b1eaf5a
Sync SDL3 wiki -> header
2024-10-04 05:54:33 +00:00
Sam Lantinga
93c27a6675
Fixed the documentation for consistency.
2024-10-03 22:54:05 -07:00
SDL Wiki Bot
3ae2af8aa1
Sync SDL3 wiki -> header
2024-10-04 05:53:50 +00:00
Ryan C. Gordon
9a5d5a2839
video: Improve the EGL attribute callbacks.
...
Now it has access to information it needs and it's clear who is reponsible
for memory management.
Fixes #11039 .
2024-10-03 22:52:52 -07:00
Ryan C. Gordon
191f3ecbbc
render: Restore previous policy for converting window/render coordinates.
...
Before this commit, it would adjust for the logical presentation settings.
Now, it works as it did before the logical presentation render target was
removed: it takes current viewport and scale into account, as well.
Fixes #10978 .
2024-10-03 16:31:56 -04:00
Ethan Lee
a0de6c4abf
Add properties to SDL_IOStreams returned by IOFromMem
2024-10-02 22:09:09 -07:00
Ryan C. Gordon
d287feaddf
render: Remove non-pointer args' const qualifiers on SDL_RenderTextureRotated.
...
Reference Issue #11032 .
2024-10-02 15:31:20 -04:00
SDL Wiki Bot
e3757f072b
Sync SDL3 wiki -> header
2024-10-02 19:28:35 +00:00
Ryan C. Gordon
35b002be82
audio: Clarified SDL_GetAudioStreamQueued docs.
2024-10-02 15:27:46 -04:00
Sam Lantinga
d5fe6dd627
Don't use const for non-pointer API parameters
2024-10-02 09:17:31 -04:00
Sam Lantinga
91b074beb7
Removed SDL_IPHONE_MAX_GFORCE
...
We no longer support interpreting the accelerometer as a joystick.
Fixes https://github.com/libsdl-org/SDL/issues/11005
2024-10-01 18:00:22 -07:00
SDL Wiki Bot
34033d5838
Sync SDL3 wiki -> header
2024-10-01 18:45:52 +00:00
Sam Lantinga
eced9f58a9
Added a userdata parameter for EGL attribute callbacks
...
Fixes https://github.com/libsdl-org/SDL/issues/11013
2024-10-01 11:45:19 -07:00
SDL Wiki Bot
798c9574d0
Sync SDL3 wiki -> header
2024-10-01 17:46:16 +00:00
Sam Lantinga
89e68aa801
Added missing return value documentation for bsearch()
2024-10-01 10:45:32 -07:00
Sam Lantinga
4fa92d233d
Include stdbool.h when using Visual Studio 2017+
...
Also cleaned up some incorrect return values from bool functions.
2024-10-01 09:57:59 -07:00
Anthony
5f5379dc99
Add `SDL_IsTV()` ( #11004 )
...
Moved SDL_IsAndroidTV() out of public API, to match SDL_IsAndroidTablet().
Added SDL_IsTV(), to mirror existing SDL_IsTablet().
2024-10-01 09:20:00 -07:00
SDL Wiki Bot
6bcf2f919a
Sync SDL3 wiki -> header
2024-10-01 16:16:44 +00:00
Ryan C. Gordon
0b5e01a305
loadso: library handles are now `SDL_SharedObject*` instead of `void*`.
...
Improved the SDL_loadso.h documentation a little, too.
Fixes #11009 .
2024-10-01 12:16:10 -04:00
SDL Wiki Bot
f351395c46
Sync SDL3 wiki -> header
2024-10-01 15:10:40 +00:00
Sam Lantinga
3234a3b902
Simplified internal SDL_Surface structure
2024-10-01 08:10:04 -07:00
Sam Lantinga
1f3a0d12e6
Made texture size and format public in the API
...
Also added refcount to textures so they can be retained by application code.
2024-10-01 08:10:04 -07:00
Ryan C. Gordon
b4fcd1f345
pen: Corrected some documentation.
...
Fixes #10863 .
2024-10-01 10:24:17 -04:00
Sam Lantinga
e3dbd74fe7
Improved documentation for SDL_Surface fields
2024-09-30 21:34:00 -07:00
SDL Wiki Bot
c16d7c87d6
Sync SDL3 wiki -> header
2024-09-30 18:18:49 +00:00
Sam Lantinga
ab832f1be0
Added documentation for qsort and bsearch functions
2024-09-30 11:18:17 -07:00
SDL Wiki Bot
dcc7560a5c
Sync SDL3 wiki -> header
2024-09-30 17:23:50 +00:00
Evan Hemsley
afdf325fb4
GPU: Add swapchain dimension out params ( #11003 )
2024-09-30 10:23:19 -07:00
Ryan C. Gordon
1787d6ca5c
main: SDL_AppQuit() now reports the result value.
...
Fixes #10994 .
2024-09-29 23:24:04 -04:00
SDL Wiki Bot
62938837c2
Sync SDL3 wiki -> header
2024-09-29 01:10:39 +00:00
Evan Hemsley
fc242abbd2
GPU: recreate swapchain on window pixel size change event ( #10985 )
2024-09-28 18:09:56 -07:00
Sam Lantinga
a923771978
Added SDL_murmur3_32()
2024-09-28 17:19:01 -07:00
Sam Lantinga
039148fb0e
Updated check for stdbool.h
...
If you're building in a C99 or newer environment, we'll automatically include stdbool.h.
If you're building in a C89 or C90 environment, we'll assume that stdbool.h isn't available and define bool as an unsigned char. If you have a working stdbool.h and want SDL to use it, you can either include stdbool.h before SDL headers, or define SDL_INCLUDE_STDBOOL_H in your project.
Closes https://github.com/libsdl-org/SDL/pull/10980
2024-09-28 16:55:09 -07:00
Petar Popovic
dee62e1b47
Remove trailing comma in enum
2024-09-28 17:47:37 +03:00
Ryan C. Gordon
7d21a49c9c
filesystem: SDL_EnumerateDirectoryCallback uses an enum now, not an int.
...
Fixes #10955 .
2024-09-28 01:33:40 -04:00
SDL Wiki Bot
0542bbbf1a
Sync SDL3 wiki -> header
2024-09-27 22:55:29 +00:00
Ryan C. Gordon
428f2f35be
filesystem: SDL_CreateDirectory should make parent directories.
...
Fixes #10502 .
2024-09-27 18:54:18 -04:00
SDL Wiki Bot
8d6b397cd8
Sync SDL3 wiki -> header
2024-09-27 21:11:58 +00:00
Sam Lantinga
3f446d8fb5
Minor cleanup
2024-09-27 14:10:46 -07:00
SDL Wiki Bot
8377cad974
Sync SDL3 wiki -> header
2024-09-27 20:50:17 +00:00
cosmonaut
c39e8298b7
GPU: Document swapchain dimensions
2024-09-27 13:49:27 -07:00
SDL Wiki Bot
0e5a49542d
Sync SDL3 wiki -> header
2024-09-27 20:39:24 +00:00
David Fort
f32e96f5e2
clipboard: add SDL_ClipboardMimeTypes
...
This function allows to retrieve the available mime types without doing any
synthesizing.
2024-09-27 13:38:40 -07:00
SDL Wiki Bot
0befa7d8e9
Sync SDL3 wiki -> header
2024-09-27 20:27:48 +00:00
cosmonaut
eedd2039f9
GPU: 32-bit component texture formats
2024-09-27 16:26:43 -04:00
SDL Wiki Bot
769ff47461
Sync SDL3 wiki -> header
2024-09-27 19:50:13 +00:00
Evan Hemsley
05d0656bd6
GPU: Simultaneous compute pass read-write ( #10965 )
2024-09-27 12:49:37 -07:00
Caleb Cornett
5ff6e8d522
GPU: Add enable_depth_clip to RasterizerState ( #10964 )
2024-09-27 11:18:54 -05:00
Sam Lantinga
04bb105d09
Added header for SDL_ThreadID type
2024-09-27 08:16:49 -07:00
SDL Wiki Bot
c7442b04f0
Sync SDL3 wiki -> header
2024-09-27 07:30:57 +00:00
Evan Hemsley
be401dd1e3
GPU: More robust error reporting ( #10958 )
...
---------
Co-authored-by: Ethan Lee <flibitijibibo@gmail.com>
Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
2024-09-27 00:30:18 -07:00
SDL Wiki Bot
0d593cf39a
Sync SDL3 wiki -> header
2024-09-26 23:29:38 +00:00
Ryan C. Gordon
f267ec7681
filesystem: Improve docs, make some promises about overwrites and file caches.
...
Note that SDL_FlushIO() doesn't make promises about file data sync but that
is intended to be changed in the IOStream code in a later commit.
Fixes #10886 .
2024-09-26 19:29:03 -04:00
SDL Wiki Bot
c1587b1eac
Sync SDL3 wiki -> header
2024-09-26 23:26:52 +00:00
Sam Lantinga
125e592844
Added SDL_ShouldInit() and SDL_ShouldQuit()
...
These are handy functions to support thread-safe initialization and shutdown.
2024-09-26 16:26:12 -07:00
Ryan C. Gordon
4e09e58f62
include: Small clarification on directory enumeration documentation.
2024-09-26 16:39:35 -04:00
Anonymous Maarten
345cae361d
Document mode parameter of SDL_GetRenderLogicalPresentation
2024-09-26 16:12:13 +02:00
SDL Wiki Bot
59d69a3ba3
Sync SDL3 wiki -> header
2024-09-26 04:21:40 +00:00
Sam Lantinga
d9a7da4fac
Optimized SDL_HasEvent() and SDL_HasEvents()
...
Also document the counting behavior of SDL_PEEKEVENT.
Fixes https://github.com/libsdl-org/SDL/issues/6209
2024-09-25 21:20:00 -07:00
SDL Wiki Bot
81644d260f
Sync SDL3 wiki -> header
2024-09-25 20:31:24 +00:00
Ryan C. Gordon
122cd4db2b
include: Added `\threadsafety` notes to all SDL_render.h functions.
2024-09-25 16:30:04 -04:00
SDL Wiki Bot
276969cd58
Sync SDL3 wiki -> header
2024-09-25 20:27:11 +00:00
Ryan C. Gordon
4c48ff51f8
render: SDL_RenderPresent now behaves when a render target is currently set.
...
It'll temporarily unbind it, draw letterboxing if necessary, present, and
then rebind the previous render target.
2024-09-25 16:26:36 -04:00
Ryan C. Gordon
7a6a0becb8
render: Fixed a FIXME for SDL_SetRenderViewport with a negative size.
2024-09-25 16:26:36 -04:00
Ryan C. Gordon
54459def69
render: Remove the logical presentation render target.
...
Now we render directly to the window, scaling as appropriate. This fixes some
concerns the render target introduced, like the quality of the final scaled
output, how to step outside of the logical size temporarily to draw some
things sharply at the native resolution, and loss of sub-pixel precision.
Fixes #8736 .
2024-09-25 16:26:36 -04:00
Petar Popovic
043c876a15
Move default colorspace aliases into enum
2024-09-23 07:37:02 -07:00
Susko3
0478a6ee3b
Move endian pixel format aliases into enum
...
Matches the same thing in `SDL_AudioFormat`.
2024-09-22 16:34:42 -07:00
Sam Lantinga
b0e528cc88
Switched ifdef from negative to positive
2024-09-21 20:12:54 -07:00
Ozkan Sezer
254b36361e
Add SDL_PRILL? format specifiers specifically for long long type.
2024-09-21 23:03:50 +03:00
Sam Lantinga
6f80d47d64
Use hexidecimal code for ±
2024-09-21 10:43:34 -07:00
Petar Popovic
4392233007
Removed tabs from headers
2024-09-21 10:39:53 -07:00
SDL Wiki Bot
1f727b61f3
Sync SDL3 wiki -> header
2024-09-18 21:04:36 +00:00
Sam Lantinga
398dff7c25
Added support for the HORI licensed Steam Controller
2024-09-18 14:08:32 -07:00
Ozkan Sezer
7edf7fad66
fix bool define when SDL_DEFINE_STDBOOL is defined:
...
it should be unsigned.
2024-09-18 12:17:22 -07:00
Ozkan Sezer
ff90570a3c
define SDL_DEFINE_STDBOOL for gcc < 3
2024-09-18 12:17:22 -07:00
Sam Lantinga
ea640894d3
Fixed SDL_DEFINE_STDBOOL logic if __bool_true_false_are_defined is defined
2024-09-18 10:50:52 -07:00
Sam Lantinga
32fd1878a0
Provide a definition of bool if needed for your environment
2024-09-18 10:37:11 -07:00
SDL Wiki Bot
026d3c2306
Sync SDL3 wiki -> header
2024-09-18 15:33:11 +00:00
Sam Lantinga
a90ad3b0e2
Removed SDL_bool in favor of plain bool
...
We require stdbool.h in the build environment, so we might as well use the plain bool type.
If your environment doesn't have stdbool.h, this simple replacement will suffice:
typedef signed char bool;
2024-09-18 08:32:30 -07:00
SDL Wiki Bot
9dd8859240
Sync SDL3 wiki -> header
2024-09-18 15:19:01 +00:00
Sam Lantinga
bd04459cde
Fix typos (thanks @qndel!)
...
Fix typos in comments and in one case in a returned error ("insuffient -> insufficient" fb273eb )
codespell src/ *.cpp *.h *.hpp --ignore-words-list unknwn,thid,algebric,statics,pixelX,pEvents,caf,ptd,parms,pEvent,parm,TextureRS,TE,HDA,LOD,datas,UE,xwindows,IIF
cd src; git checkout \
events/imKStoUCS.* \
hidapi \
joystick/controller_type.c \
joystick/controller_type.h \
joystick/hidapi/steam/controller_constants.h \
joystick/hidapi/steam/controller_structs.h \
libm \
stdlib/SDL_malloc.c \
stdlib/SDL_qsort.c \
stdlib/SDL_strtokr.c \
video/khronos \
video/x11/edid.h \
video/x11/edid-parse.c \
video/x11/xsettings-client.* \
video/yuv2rgb
2024-09-18 08:18:26 -07:00
SDL Wiki Bot
8481d1a12b
Sync SDL3 wiki -> header
2024-09-17 15:54:09 +00:00
Sam Lantinga
d0edf68774
Added Uint32 versions of the atomic functions
2024-09-17 08:53:27 -07:00
Sam Lantinga
8d223b3037
Renamed atomic functions to match SDL 3.0 naming convention
...
This will also allow us to cleanly add atomic operations for other types in the future.
2024-09-17 08:53:27 -07:00
Sam Lantinga
f3e419596b
Removed SDL_INIT_TIMER
...
This is no longer necessary before calling SDL_AddTimer()
2024-09-17 08:53:27 -07:00
Sam Lantinga
231ea07617
Added SDL_LogTrace()
2024-09-17 02:04:54 -07:00
SDL Wiki Bot
926d143966
Sync SDL3 wiki -> header
2024-09-16 20:12:52 +00:00
Sam Lantinga
1bbc897e48
Updated documentation for bool return type
...
Also updated the test CRC functions to return bool.
2024-09-16 13:12:15 -07:00
SDL Wiki Bot
4a2683e2c1
Sync SDL3 wiki -> header
2024-09-16 20:09:54 +00:00
Sam Lantinga
dc639956ba
Improve logging performance and make log priorities thread-safe
...
Fixes https://github.com/libsdl-org/SDL/issues/9679
2024-09-16 13:09:17 -07:00
SDL Wiki Bot
f006d61bd1
Sync SDL3 wiki -> header
2024-09-16 17:57:51 +00:00
SDL Wiki Bot
fd1fcfc951
Sync SDL3 wiki -> header
2024-09-16 17:19:42 +00:00
Caleb Cornett
9416917353
GPU: Rework MSAA ( #10859 )
2024-09-16 12:19:09 -05:00
Caleb Cornett
4f722d372a
GPU: Metal vertex buffer indices should grow upward ( #10837 )
2024-09-15 20:17:43 -05:00
Sam Lantinga
97d40b9218
Removed SDL_CleanupEnvironment()
2024-09-15 10:00:21 -07:00
SDL Wiki Bot
a7f1deae8d
Sync SDL3 wiki -> header
2024-09-15 16:38:38 +00:00
Sam Lantinga
28b94c4758
Re-added SDL_getenv() as a thread-safe getenv() implementation
2024-09-15 09:37:04 -07:00
Sam Lantinga
19243092c6
Renamed SDL_GpuGraphicsPipelineTargetInfo to SDL_GPUGraphicsPipelineTargetInfo
...
Fixes https://github.com/libsdl-org/SDL/issues/10855
2024-09-15 07:46:26 -07:00
Carl Åstholm
1f3fd65c4c
cpuinfo: Rename SDL_GetCPUCount to SDL_GetNumLogicalCPUCores
...
This was the only API that broke the "GetNumThings" convention
used elsewhere, so renaming it helps with consistency.
Adding "logical cores" to the name also makes it a bit
more immediately obvious what the count actually represents.
2024-09-14 19:33:30 -07:00
Maia
e5bd3bbcd6
add missing includes
2024-09-14 14:38:44 -07:00
Sam Lantinga
8569bde053
Fixed typo
2024-09-14 14:35:57 -07:00
SDL Wiki Bot
706aaaf280
Sync SDL3 wiki -> header
2024-09-14 20:23:16 +00:00
Ryan C. Gordon
3bc0347761
Revert "Sync SDL3 wiki -> header"
...
This reverts commit 35427ff9ec .
2024-09-14 16:22:16 -04:00
Ryan C. Gordon
c2e4b14a82
Revert "stdinc: Added missing `\param` to SDL_CreateEnvironment."
...
This reverts commit 919f8d3e2b .
2024-09-14 16:22:09 -04:00
Ryan C. Gordon
11c9975caa
Revert "Sync SDL3 wiki -> header"
...
This reverts commit ba65767afa .
2024-09-14 16:22:00 -04:00
SDL Wiki Bot
ba65767afa
Sync SDL3 wiki -> header
2024-09-14 20:18:20 +00:00
Ryan C. Gordon
919f8d3e2b
stdinc: Added missing `\param` to SDL_CreateEnvironment.
2024-09-14 16:17:29 -04:00
SDL Wiki Bot
35427ff9ec
Sync SDL3 wiki -> header
2024-09-14 20:11:24 +00:00
Sam Lantinga
e97f636590
SDL_PROP_PROCESS_CREATE_ENVIRONMENT_POINTER is an SDL_Environment pointer
2024-09-14 12:27:22 -07:00
Sam Lantinga
e673479449
Removed SDL_WriteProcess()
...
This had the unfortunate side-effect of blocking if you tried to write too much. Instead you can use SDL_GetProcessInput() and handle SDL_IO_STATUS_NOT_READY as needed.
Fixes https://github.com/libsdl-org/SDL/issues/10834
2024-09-14 11:15:50 -07:00
ritalat
f6f49de134
Add convenience functions to get process IOStreams
2024-09-14 10:33:29 -07:00
Sam Lantinga
aa7357a14d
SDL_CreateEnvironment() fills the environment with a non-zero parameter
2024-09-14 10:29:02 -07:00
Sam Lantinga
76c469910e
Added SDL_PROP_PROCESS_CREATE_BACKGROUND_BOOLEAN
2024-09-14 10:29:02 -07:00
Sam Lantinga
90e01040c5
Added thread-safe environment functions
...
Also marked the existing functions as unsafe, as they can cause crashes if used in multi-threaded applications.
As a bonus, since the new functions are hashtable based, hint environment lookups are much faster.
2024-09-13 22:14:54 -07:00
Ethan Lee
16ff7503b7
gpu: Update GPU support queries to better match naming conventions
2024-09-13 23:08:44 -04:00
SDL Wiki Bot
d21c1de651
Sync SDL3 wiki -> header
2024-09-13 22:20:35 +00:00
Semphris
9eea8234e6
Add SDL_Process subsystem
2024-09-13 15:19:32 -07:00
Sam Lantinga
6c83491116
Added SDL_FlushIO()
...
Also added SDL_PROP_IOSTREAM_FILE_DESCRIPTOR_NUMBER and refactored the internal API to be able to create SDL_IOStream objects from native file handles.
2024-09-13 15:19:32 -07:00
Sam Lantinga
93caf1cd21
Fixed typo
2024-09-13 14:59:52 -07:00
SDL Wiki Bot
1c5b063ade
Sync SDL3 wiki -> header
2024-09-13 20:56:16 +00:00
Sam Lantinga
f1d0a71629
Fixed the documentation for SDL_SetError()
2024-09-13 13:54:54 -07:00
SDL Wiki Bot
d483886ec5
Sync SDL3 wiki -> header
2024-09-13 19:32:14 +00:00
Carl Åstholm
7d94bf528d
stdlib: Document SDL_strtox functions
2024-09-13 12:30:58 -07:00
Carl Åstholm
fb82772fb3
stdlib: Rewrite SDL_strtoull impl
2024-09-13 12:30:58 -07:00
Carl Åstholm
4efbe1ca28
stdlib: Assert that signed integers use two's complement arithmetic
2024-09-13 12:30:58 -07:00