Commit Graph

741 Commits

Author SHA1 Message Date
Ryan C. Gordon
3d86dce673 haiku: No more chdir to executable's directory at startup in SDL3.
Use SDL_GetBaseDir() to find this directory instead.

Reference Issue #8403.
Fixes #7596.
2024-07-13 12:24:27 -04:00
Sam Lantinga
730d5cf2f8 Added fractional representation of refresh rate to SDL_DisplayMode 2024-07-12 18:09:14 -07:00
Ryan C. Gordon
8779c95905 android: Added SDL_AndroidGetCachePath().
Fixes #8408.
2024-07-12 15:41:54 -04:00
Sam Lantinga
5bf6bc4d7d Renamed SDL_Get/SetProperty() to SDL_Get/SetPointerProperty()
This is consistent with the naming for the functions that affect other data types

Fixes https://github.com/libsdl-org/SDL/issues/10241
2024-07-12 10:41:02 -07:00
Sam Lantinga
875c4f0a4c Support indexed surfaces without palettes (thanks @sulix!)
Currently, all SDL_Surfaces with an indexed pixel format have an
associated SDL_Palette. This palette either consists of entirely the
colour black, or -- in the special case of 1-bit surfaces, black and
white.

When an indexed surface is blitted to another indexed surface, a 'map'
is generated from the source surface's palette to the destination
surfaces palette, in order to preserve the look of the image if the
palettes differ.

However, in most cases, applications will want to blit the raw index
values, rather than translate to make the colours as similar as
possible. For instance, the destination surface's palette may have been
modified to fade the screen out.

This change allows an indexed surface to have no associated palette. If
either the source or destination surface of a blit do not have a
palette, then the raw indices are copied (assuming both have an indexed
format).

This mimics better what happens with most other APIs (such as
DirectDraw), where most users do not set a palette on any surface but
the screen, whose palette is implicitly used for the whole application.
2024-07-11 08:31:32 -07:00
Sam Lantinga
60ed914c66 Added notes for migrating SDL_GetRGBA()/SDL_MapRGBA() code 2024-07-10 13:19:46 -07:00
Ryan C. Gordon
af2dbf3ff3 video: Rename SDL_GL_DeleteContext to SDL_GL_DestroyContext.
Turns out that there isn't a strong OpenGL naming convention for "Delete" ...
WGL offers "wglDeleteContext" but the GLX equivalent is "glxDestroyContext"
and then EGL sealed the deal by going with Destroy as well! Since it matches
SDL3 naming conventions (Create/Destroy), we're renaming it.

Fixes #10197.
2024-07-10 15:54:08 -04:00
Sam Lantinga
2ba76dbe80 Simplified SDL_Surface
SDL_Surface has been simplified and internal details are no longer in the public structure.

The `format` member of SDL_Surface is now an enumerated pixel format value. You can get the full details of the pixel format by calling `SDL_GetPixelFormatDetails(surface->format)`. You can get the palette associated with the surface by calling SDL_GetSurfacePalette(). You can get the clip rectangle by calling SDL_GetSurfaceClipRect().

SDL_PixelFormat has been renamed SDL_PixelFormatDetails and just describes the pixel format, it does not include a palette for indexed pixel types.

SDL_PixelFormatEnum has been renamed SDL_PixelFormat and is used instead of Uint32 for API functions that refer to pixel format by enumerated value.

SDL_MapRGB(), SDL_MapRGBA(), SDL_GetRGB(), and SDL_GetRGBA() take an optional palette parameter for indexed color lookups.
2024-07-10 00:48:18 -07:00
Anonymous Maarten
50ae47af5e android: create android project in create-android-project.py python script
This script supersedes androidbuild.sh, and also supports using a SDL3 prefab archive
2024-07-05 21:12:26 +02:00
Frank Praznik
74cc06db1b Remove the SDL_EVENT_WINDOW_TAKE_FOCUS event
This was added by the Unreal Engine to handle the input focus for popups and dialogs, window types for which SDL3 has built-in, cross-platform support.

This was only ever implemented in X11, and the only purpose was to hint that a client application may want to call the SDL_SetWindowInputFocus() function, which has since been removed, rendering it pointless now.
2024-07-03 15:08:21 -04:00
Frank Praznik
be13328cb1 Remove SDL_SetWindowInputFocus
This was added to SDL2 for the Unreal Engine's implementation of menus and dialogs on X11, window types for which SDL3 has added built-in, cross-platform support.

Remove this function, as it was only ever implemented for X11 and is now basically useless aside from allowing annoying or malicious client apps to discretely steal focus. As the documentation states: "You almost certainly want SDL_RaiseWindow() instead of this function."
2024-07-03 15:08:21 -04:00
Sam Lantinga
e8dbbf8380 Renamed SDLK_a-z to SDLK_A-Z
Made the symbols uppercase for consistency with the other SDLK_* constants, but the values are still lowercase.
2024-07-01 13:56:49 -07:00
SDL Wiki Bot
5755bde3b8 Sync SDL3 wiki -> header 2024-07-01 20:36:18 +00:00
Sam Lantinga
212a491f7c Renamed SDL_HINT_IME_NATIVE_UI to SDL_HINT_IME_IMPLEMENTED_UI
This inverts the logic to make more sense from an application perspective.
2024-06-28 19:41:37 -07:00
Sam Lantinga
4c7db129df SDL_HINT_IME_INTERNAL_EDITING and SDL_HINT_IME_SHOW_UI are replaced with SDL_HINT_IME_NATIVE_UI 2024-06-28 17:09:22 -07:00
Sam Lantinga
bdd531986b SDL_SetTextInputRect() has been renamed to SDL_SetTextInputArea()
The new function includes the cursor position so IME UI elements can be placed relative to the cursor, as well as having the whole text area available so on-screen keyboards can avoid it.
2024-06-28 17:09:22 -07:00
SDL Wiki Bot
c983c1da97 Sync SDL3 wiki -> header 2024-06-28 22:35:57 +00:00
Ryan C. Gordon
982feb7a65 vulkan: SDL_Vulkan_CreateSurface now returns the usual int (0=ok, -1=error).
Fixes #10091.
2024-06-27 15:25:10 -04:00
SDL Wiki Bot
306cc6f91e Sync SDL3 wiki -> header 2024-06-26 17:52:24 +00:00
Sam Lantinga
76631a0978 The text input state has been changed to be window-specific.
SDL_StartTextInput(), SDL_StopTextInput(), SDL_TextInputActive(), SDL_ClearComposition(), and SDL_SetTextInputRect() all now take a window parameter.

This change also fixes IME candidate positioning when SDL_SetTextInputRect() is called before SDL_StartTextInput(), as is recommended in the documentation.
2024-06-24 11:20:08 -07:00
Sam Lantinga
90034b16dc The keycode in key events is affected by modifiers by default.
This behavior can be customized with SDL_HINT_KEYCODE_OPTIONS.
2024-06-22 00:19:06 -07:00
Sam Lantinga
0dd579d40d Removed SDL_Keysym 2024-06-21 22:06:08 -07:00
Sam Lantinga
679e4471ed Added the ability to query the keymap for keycodes based on modifier state 2024-06-21 22:06:08 -07:00
Sam Lantinga
9d816c72ef Updated SDL3 scancode list
This adds more app editing and audio control keys and removes keys that launch applications

Work in progress on https://github.com/libsdl-org/SDL/issues/6390
2024-06-21 22:06:08 -07:00
Hubert Maier
81d8fcb5d8
JANITORIAL: Fix judgement typos (#10059) 2024-06-19 07:14:58 -07:00
Hubert Maier
3acdb8a90b
JANITORIAL: Fix typos in comments in various files (#10058) 2024-06-19 07:13:46 -07:00
Zack Middleton
02597cdc56 Remove cursors not in SDL2 from migration guide 2024-06-18 12:22:02 -04:00
Ryan C. Gordon
38f0214e8a audio: Refer to audio devices to "playback" and "recording".
Fixes #9619.
2024-06-15 01:08:12 -04:00
Sam Lantinga
80a907e0e6 Backed out the viewport and cliprect changes in 9fb5a9ccac
This ended up being lots of application code churn without any real benefit in practice.
2024-06-12 19:25:15 -07:00
Ryan C. Gordon
5416bd5fdc
ios: Move animation callback to its own typedef. 2024-06-12 15:10:16 -04:00
Sam Lantinga
9fb5a9ccac Use floating point values for viewport, clip rectangle, and texture sizes
These are integer values internally, but the API has been changed to make it easier to mix other render code with querying those values.

Fixes https://github.com/libsdl-org/SDL/issues/7519
2024-06-12 10:18:39 -07:00
Anonymous Maarten
32907a9606 Rename SDL_Swap(16|32|64)(LE|BE) to SDL_Swap(LE|BE)(16|32|64) 2024-06-12 02:29:39 +02:00
Anonymous Maarten
657c0135b1 android: android release binary should only contain a shared SDL3 library 2024-06-10 18:04:18 +02:00
Anonymous Maarten
dd0bb25f66 cmake: remove SDL_STATIC_PIC cmake option.
Use CMAKE_POSITION_INDEPENDENT_CODE instead
2024-06-10 18:04:18 +02:00
Sam Lantinga
5701c4f4bc Added migration documentation for iOS window properties
Fixes https://github.com/libsdl-org/SDL/issues/9430
2024-06-06 10:59:15 -07:00
Sam Lantinga
a0d1445ccb Replaced SDL_GetRendererInfo() with SDL_GetRendererName()
The texture formats are available via the SDL_PROP_RENDERER_TEXTURE_FORMATS_POINTER property

Fixes https://github.com/libsdl-org/SDL/issues/9851
2024-06-03 21:10:58 -07:00
Sam Lantinga
3e70964ae2 Updated docs to note that SDL_GetAudioDeviceName() now returns const char * 2024-06-03 17:42:53 -07:00
SDL Wiki Bot
17c459e384 Sync SDL3 wiki -> header 2024-06-03 18:48:59 +00:00
SDL Wiki Bot
9c4fb449e2 Sync SDL3 wiki -> header 2024-06-03 18:41:23 +00:00
SDL Wiki Bot
de5a8b61d0 Sync SDL3 wiki -> header 2024-06-03 18:27:57 +00:00
Ryan C. Gordon
e23257307e Introduce formal policy for APIs that return strings.
This declares that any `const char *` returned from SDL is owned by SDL, and
promises to be valid _at least_ until the next time the event queue runs, or
SDL_Quit() is called, even if the thing that owns the string gets destroyed
or changed before then.

This is noted in the headers as "the SDL_GetStringRule", so this will both be
greppable to find a detailed explaination in docs/README-strings.md and
wikiheaders will automatically turn it into a link we can point at the
appropriate documentation.

Fixes #9902.

(and several FIXMEs, both known and yet-undocumented.)
2024-06-03 14:20:49 -04:00
Ryan C. Gordon
9a9a3d1a33 SDL_SystemCursor: rename enum items to match CSS.
Fixes #9079.
2024-06-01 22:32:43 -04:00
Sam Lantinga
b6360516e4 Added the timerID to the SDL timer callback
Fixes https://github.com/libsdl-org/SDL/issues/2593
2024-05-27 07:57:33 -07:00
Sam Lantinga
df25e4022d Removed short aliases for 16-bit pixel formats
These were potentially misleading in the same way the RGB888/BGR888 aliases were

Fixes https://github.com/libsdl-org/SDL/issues/4994
2024-05-27 07:24:46 -07:00
d-musique
535be42b1c Correct name for SDL_CreateThreadWithStackSize() 2024-05-24 07:32:34 -07:00
Sam Lantinga
7a043d9958 Note that SDL_BlitSurface() was renamed SDL_BlitSurfaceScaled() 2024-05-24 05:33:51 -07:00
Ryan C. Gordon
b83bb035e6 thread: SDL_CreateThreadWithStackSize is now SDL_CreateThreadWithProperties. 2024-05-22 11:39:43 -04:00
Ryan C. Gordon
0ec716819e thread: Reworked SDL_CreateThread to be consistent across platforms.
Also documented missing and weird bits, rename typedefs to fit SDL standards.
2024-05-22 11:39:43 -04:00
SDL Wiki Bot
95aa9a79a9 Sync SDL3 wiki -> header 2024-05-22 00:07:49 +00:00
SDL Wiki Bot
7164ca374e Sync SDL3 wiki -> header 2024-05-22 00:06:36 +00:00
SDL Wiki Bot
1f0884ffef Sync SDL3 wiki -> header 2024-05-21 23:59:08 +00:00
Anonymous Maarten
45081db9d4 Build Android prefab in releaser.py script
[ci skip]
2024-05-22 01:28:44 +02:00
Sam Lantinga
6f2621438a Renamed DECLSPEC to SDL_DECLSPEC 2024-05-17 17:09:09 -07:00
Brick
b6b9d5508e Renamed SDL_MixAudioFormat to SDL_MixAudio, and use float volume 2024-05-17 13:36:51 +01:00
Sam Lantinga
7cddde32ac Removed SDL_SWSURFACE, added unsigned suffix for surface flags 2024-05-16 11:40:38 -07:00
Sam Lantinga
02ff85f2f3 Renamed SDL_SIMDGetAlignment() to SDL_GetSIMDAlignment() 2024-05-16 10:22:15 -07:00
Sam Lantinga
4609af618a Updated logging functions for SDL3 naming convention 2024-05-16 10:22:15 -07:00
Ryan C. Gordon
241603b607
README-documentation-rules: Reorganized sections into a more-clear order.
(I hope.)
2024-05-16 12:58:14 -04:00
Ryan C. Gordon
4b3b5fb56c
docs: Remove some mistakenly-generated pages. 2024-05-15 14:59:26 -04:00
Ryan C. Gordon
d57f2afcaf
docs/README-documentation-rules.md: Added more content, fixed a typo. 2024-05-15 14:22:19 -04:00
Sam Lantinga
661f2fc1fc Removed the SDL_Version structure, moved SDL version to SDL.h
Inspired by https://github.com/libsdl-org/SDL/issues/9788
2024-05-15 10:43:31 -07:00
SDL Wiki Bot
5a0879b7dd Sync SDL3 wiki -> header 2024-05-15 17:17:31 +00:00
SDL Wiki Bot
f9876b6b5c Sync SDL3 wiki -> header 2024-05-15 16:46:12 +00:00
Ryan C. Gordon
2066ee08c9
docs/README-documentation-rules.md: Initial shot at documenting this. 2024-05-15 12:33:53 -04:00
Petar Popovic
3baec8aab4 Renaming SDLK_QUOTEDBL to SDLK_DBLAPOSTROPHE 2024-05-14 08:46:38 -07:00
Sam Lantinga
17520c2e6e Removed SDL_RendererFlags
The flags parameter has been removed from SDL_CreateRenderer() and SDL_RENDERER_PRESENTVSYNC has been replaced with SDL_PROP_RENDERER_CREATE_PRESENT_VSYNC_NUMBER during window creation and SDL_PROP_RENDERER_VSYNC_NUMBER after renderer creation.

SDL_SetRenderVSync() now takes additional values besides 0 and 1.

The maximum texture size has been removed from SDL_RendererInfo, replaced with SDL_PROP_RENDERER_MAX_TEXTURE_SIZE_NUMBER.
2024-05-13 15:06:11 -07:00
Petar Popovic
94cbaaabbf Renaming SDLK_QUOTE and SDLK_BACKQUOTE
Renaming SDLK_QUOTE to SDLK_APOSTROPHE.
Renaming SDLK_BACKQUOTE to SDLK_GRAVE.
This makes them similar to their scancode names.
2024-05-13 11:11:11 -07:00
Anonymous Maarten
a4371d28ac doc: document how to use generator expressions + explain why we no longer provide CMake variables 2024-05-11 17:20:16 -04:00
Sam Lantinga
bcbf09acde Renamed SDL_AttachVirtualJoystickEx() to SDL_AttachVirtualJoystick()
The shorthand version of this function didn't allow specifying a controller name, which seems pretty important. It seems like anyone actually implementing a virtual joystick is going to want to use some of the extended functionality.
2024-05-09 14:05:58 -07:00
Sam Lantinga
54fb629da5 SDL_WindowFlags is now 64-bit
Fixes https://github.com/libsdl-org/SDL/issues/7321
2024-05-09 10:39:54 -07:00
Sam Lantinga
1944c009e9 SDL_Keycode is now Uint32 2024-05-09 10:00:46 -07:00
Sam Lantinga
88fc529261 Removed misleading documentation for SDL_AppEvent()
Fixes https://github.com/libsdl-org/SDL/issues/9731
2024-05-09 09:01:27 -07:00
Frank Praznik
3a6d9c59f4 wayland: Add mouse pointer warp support
The pointer confinement protocol does allow attempted warping the pointer via a hint, provided that the pointer is locked at the time of the request, and the requested coordinates fall within the bounds of the window.

Toggle the pointer locked state and request the pointer warp when the required protocol is available. This is similar to what XWayland does internally.
2024-05-03 12:33:19 -04:00
Sam Lantinga
b18a071639 Removed SDL_DROPEVENT_DATA_SIZE and SDL_TEXTEDITINGEVENT_TEXT_SIZE
Fixes https://github.com/libsdl-org/SDL/issues/9681
2024-05-03 09:19:49 -07:00
Ryan C. Gordon
46b69af5a3
SDL_vulkan.h: Remove Tizen compatibility typedefs.
Any app for this system that wants to move to SDL3 will have to adjust to
all the other API changes anyhow, so there's no need to keep these anymore.

Fixes #9678.
2024-05-02 23:25:44 -04:00
Petar Popovic
7bfecacc02 Removing function macro SDL_TABLESIZE() 2024-04-29 13:52:48 -07:00
SDL Wiki Bot
d42d661498 Sync SDL3 wiki -> header 2024-04-26 18:04:12 +00:00
Sam Lantinga
14f584a94b SDL_CreateWindowAndRenderer() takes the window title as the first parameter
Fixes https://github.com/libsdl-org/SDL/issues/9626
2024-04-25 20:00:14 -07:00
Ryan C. Gordon
42579e2af1
docs: Remove README-hg.md
It's been a few years in general, and SDL3 has never been in Mercurial.

We'll leave this document alive in the SDL2 branch, though!
2024-04-23 15:48:29 -04:00
SDL Wiki Bot
64d5fb6ab6 Sync SDL3 wiki -> header 2024-04-18 17:41:14 +00:00
Ryan C. Gordon
093160904d
SDL_Keymod: Removed SDL_KMOD_RESERVED.
Fixes #9481.
2024-04-17 17:30:10 -04:00
Ryan C. Gordon
235bfe2631
SDL_log.h: Remove SDL_MAX_LOG_MESSAGE.
The message length limit was removed in 2.0.24, so there's no need for
this define in SDL3 at all.

Fixes #9467.
2024-04-16 00:31:57 -04:00
Sam Lantinga
70ce808c09 Changed SDL_KeyCode values to defines
This clears up confusion about whether to use SDL_KeyCode or SDL_Keycode and makes it clear that the values aren't the full set of possible keycodes.

Fixes https://github.com/libsdl-org/SDL/issues/9493
2024-04-15 11:08:51 -10:00
Sam Lantinga
1862a62b5d Replaced SDL_GetNumTouchFingers() and SDL_GetTouchFinger() with SDL_GetTouchFingers()
Fixes https://github.com/libsdl-org/SDL/issues/9484
2024-04-15 09:22:41 -10:00
Ryan C. Gordon
9c8c254af2
include: Removed SDL_quit.h
It only had one (sort of scary) macro in it.

Fixes #9534.
2024-04-15 11:35:39 -04:00
Petar Popovic
56e6f05440 SDL_RendererFlip rename fixes 2024-04-15 03:32:23 -10:00
Ryan C. Gordon
239b34d760
docs: Added some notes about iOS and the main callbacks. 2024-04-13 15:14:32 -04:00
Ryan C. Gordon
6e1ed94913
ios: Renamed APIs that referred to "iPhone" to refer to "iOS".
Macros that papered over this difference in SDL2 have been removed for SDL3.

Fixes #9527.
2024-04-13 14:30:30 -04:00
Ryan C. Gordon
d252a8fe12
joystick: SDL_VirtualJoystickDesc no longer takes a struct version.
If we need to extend this in the future, we'll make a second struct and
a second SDL_AttachVirtualJoystickEx-style function that uses it.

Just zero the struct and don't set a version.

Fixes #9489.
2024-04-13 14:16:12 -04:00
Ryan C. Gordon
98e9f361a8
winrt: Remove SDL_WinRTGetFSPathUNICODE, rename SDL_WinRTGetFSPathUTF8.
Fixes #9470.
2024-04-13 08:24:12 -04:00
Frank Praznik
d7dcf4916f docs: Mention the SDL_HINT_VIDEO_SYNC_WINDOW_OPERATIONS hint in the migration guide 2024-04-10 21:51:03 -04:00
Petar Popovic
9b5944a14f Removing SDL_Colour macro 2024-04-09 12:25:36 -04:00
Petar Popovic
c8a066019b Renaming SDL_eventaction to SDL_EventAction 2024-04-08 14:28:52 -04:00
Sam Lantinga
5fa87e29e7 Removed SDL_RENDERER_ACCELERATED and SDL_RENDERER_SOFTWARE
These flags are unnecessary and have always been a source of confusion.
2024-04-04 13:30:49 -07:00
Sam Lantinga
8847b35244 Separate joystick power state into battery status and percentage
This allows you to see battery percentage while the controller is charging
2024-04-01 13:59:00 -07:00
Sam Lantinga
5e624c2083 Moved display and window event renaming to the correct header section
Closes https://github.com/libsdl-org/SDL/pull/9396
2024-04-01 13:57:05 -07:00
Ryan C. Gordon
74b58aebb9
README-migration: fix function signature on SDL_(Read|Write)IO docs. 2024-03-31 16:43:53 -04:00
Ryan C. Gordon
6b20152bda
README-migration: Removed duplicate paragraph.
(Exact same text also exists earlier in the SDL_audio.h section.)
2024-03-31 16:26:08 -04:00
Mirko Galimberti
60cacc8277 README-migration: Fix wrong new name for SDL_WINDOWEVENT_ENTER and SDL_WINDOWEVENT_LEAVE 2024-03-31 12:47:55 -07:00
Ryan C. Gordon
a5c892d2c3 stdlib: Improve Unicode support and consistency in string comparison functions.
SDL_strcasecmp (even when calling into a C runtime) does not work with
Unicode chars, and depending on the user's locale, might not work with
even basic ASCII strings.

This implements the function from scratch, using "case-folding,"
which is a more robust method that deals with various languages. It
involves a hashtable of a few hundred codepoints that are "uppercase" and
how to map them to lowercase equivalents (possibly increasing the size of
the string in the process). The vast majority of human languages (and
Unicode) do not have letters with different cases, but still, this static
table takes about 10 kilobytes on a 64-bit machine.

Even this will fail in one known case: the Turkish 'i' folds differently
if you're writing in Turkish vs other languages. Generally this is seen as
unfortunate collateral damage in cases where you can't specify the language
in use.

In addition to case-folding the codepoints, the new functions also know how
to decode the various formats to turn them into codepoints in the first
place, instead of blindly stepping by one byte (or one wchar_t) per
character.

Also included is casefolding.txt from the Unicode Consortium and a perl
script to generate the hashtable from that text file, so we can trivially
update this if new languages are added in the future.

A simple test using the new function:

```c
 #include <SDL3/SDL.h>

 int main(void)
 {
     const char *a = "α ε η";
     const char *b = "Α Ε Η";
     SDL_Log("    strcasecmp(\"%s\", \"%s\") == %d\n", a, b, strcasecmp(a, b));
     SDL_Log("SDL_strcasecmp(\"%s\", \"%s\") == %d\n", a, b, SDL_strcasecmp(a, b));
     return 0;
 }
```

Produces:

```
INFO:     strcasecmp("α ε η", "Α Ε Η") == 32
INFO: SDL_strcasecmp("α ε η", "Α Ε Η") == 0
```

glibc strcasecmp() fails to compare a Greek lowercase string to its uppercase
equivalent, even with a UTF-8 locale, but SDL_strcasecmp() works.

Other SDL_stdinc.h functions are changed to be more consistent, which is to
say they now ignore any C runtime and often dictate that only English-based
low-ASCII works with them.

Fixes Issue #9313.
2024-03-29 15:01:40 -04:00
Sam Lantinga
0aa1022358 Clarify that SDL_SetWindowKeyboardGrab() is only needed if you set SDL_HINT_GRAB_KEYBOARD 2024-03-28 09:25:22 -07:00
Ryan C. Gordon
ad92c9e300
README-main-functions.md: Added notes about the new appstate parameter. 2024-03-27 23:04:36 -04:00
Sam Lantinga
7a9f99cff3 Corrected migration documentation for SDL_GetDisplayDPI()
Fixes https://github.com/libsdl-org/SDL/issues/9386
2024-03-27 18:27:57 -07:00
Sam Lantinga
a9dbdb1947 Removed SDL_RenderSetIntegerScale() renaming note
Fixes https://github.com/libsdl-org/SDL/issues/9384
2024-03-27 12:47:23 -07:00
Sam Lantinga
cde2dcd0d4 Note that SDL_EVENT_SYSWM has been removed
Fixes https://github.com/libsdl-org/SDL/issues/9382
2024-03-27 11:39:10 -07:00
Sam Lantinga
fed5f3a81b We no longer automatically set up a logical presentation mode 2024-03-26 10:40:40 -07:00
Sam Lantinga
b9a88bbecb Removed SDL_TextInputShown()
This was only implemented on Windows and often confused with SDL_ScreenKeyboardShown()
2024-03-25 13:26:23 -07:00
Sam Lantinga
6443c75eda Removed SDL_TEXTINPUTEVENT_TEXT_SIZE 2024-03-25 13:26:23 -07:00
Cameron Gutman
f14fb979c1 Remove legacy SDL2 input grab API 2024-03-24 16:53:23 -07:00
SDL Wiki Bot
8f33f5cc33 Sync SDL3 wiki -> header 2024-03-24 18:34:24 +00:00
Sam Lantinga
a20eec1415 Tweaking documentation for the SDL 3.0 preview release 2024-03-24 06:16:02 -07:00
Sam Lantinga
72fc6f86e5 Text input is no longer automatically enabled when initializing video.
Fixes https://github.com/libsdl-org/SDL/issues/9309
Fixes https://github.com/libsdl-org/SDL/issues/9268
2024-03-23 16:31:00 -07:00
Sam Lantinga
a1a0156756 Renamed SDL_SizeIO() SDL_GetIOSize() 2024-03-18 00:27:18 -04:00
Sam Lantinga
d65ae710a1 Renamed SDL_LogGetOutputFunction() and SDL_LogSetOutputFunction() to match SDL 3.0 naming convention 2024-03-17 12:28:11 -07:00
Ryan C. Gordon
c175eb488c
iostream: Note that the new name has nothing to do with C++'s iostream class. 2024-03-15 01:16:31 -04:00
Ryan C. Gordon
5a21d87e69
rwops: Changed filenames that reference "rwops" to "iostream". 2024-03-14 23:30:59 -04:00
Ryan C. Gordon
5440fd7d12
README-migration.md: Fixed some RWops mistakes. 2024-03-14 23:13:26 -04:00
Ryan C. Gordon
3a344cf877
rwops: Fixed some SDL2 symbols that got missed. 2024-03-14 21:57:21 -04:00
Ryan C. Gordon
fc7afa9cbf
rwops: Renamed SDL_RWops to SDL_IOStream, and other related symbols. 2024-03-14 19:38:12 -04:00
Ryan C. Gordon
7d4d8ccde0
rwops: Rename everything from SDL_RWxxx to SDL_XxxRW. 2024-03-14 19:37:04 -04:00
Ryan C. Gordon
655ceb3b31
rwops: Renamed SDL_CreateRW and SDL_DestroyRW to SDL_OpenRW and SDL_CloseRW. 2024-03-14 19:37:01 -04:00
Ryan C. Gordon
525919b315
rwops: Reworked RWops for SDL3.
- SDL_RWops is now an opaque struct.
- SDL_AllocRW is gone. If an app is creating a custom RWops, they pass the
  function pointers to SDL_CreateRW(), which are stored internally.
- SDL_RWclose is gone, there is only SDL_DestroyRW(), which calls the
  implementation's `->close` method before freeing other things.
- There is only one path to create and use RWops now, so we don't have to
  worry about whether `->close` will call SDL_DestroyRW, or if this will
  risk any Properties not being released, etc.
- SDL_RWFrom* still works as expected, for getting a RWops without having
  to supply your own implementation. Objects from these functions are also
  destroyed with SDL_DestroyRW.
- Lots of other cleanup and SDL3ization of the library code.
2024-03-14 19:36:08 -04:00
Sam Lantinga
efbbafb3f1 Re-added balls to the SDL joystick API
It turns out these were being used on Linux and at least one virtual driver was making use of them (thanks @mrfixit2001!)
2024-03-10 21:30:14 -07:00
Sam Lantinga
5643fd683f Added migration notes for enum type changes 2024-03-06 16:59:28 -08:00
Susko3
4f58d18373 Typedef SDL_WindowFlags
Window flags were previously an enum with the same name.
See ebd7f9adbd.
2024-03-06 15:08:12 -08:00
Sam Lantinga
860155680d SDL_RegisterEvents() now returns 0 if it couldn't allocate any user events. 2024-03-06 09:51:15 -08:00
SDL Wiki Bot
e0dadba6f5 Sync SDL3 wiki -> header 2024-02-25 22:26:23 +00:00
Anonymous Maarten
e6d9251ecb docs: improve CMake documentation for Apple 2024-02-25 23:25:11 +01:00
Sam Lantinga
276566235c Removed SDL_ClearHints() from the public API
Fixes https://github.com/libsdl-org/SDL/issues/9129
2024-02-24 21:07:50 -08:00
Anonymous Maarten
58e6eacf97 docs: SDL_INIT_EVERYTHING does not exist anymore 2024-02-21 00:52:04 +01:00
Ryan C. Gordon
bc984f78bf android: Remove blocking permission request code. Async only in SDL3!
(this actually still blocks at our internal points of usage, though, for
replacement at a later time.)
2024-02-13 12:06:51 -05:00
Sam Lantinga
734d6fa1f3 Fixed documentation of SDL_PROP_WINDOW_CREATE_EXTERNAL_GRAPHICS_CONTEXT_BOOLEAN 2024-02-12 18:53:26 -08:00
Sam Lantinga
dca2721b91 Removed SDL_HINT_VIDEO_EXTERNAL_CONTEXT
This is replaced with SDL_PROP_WINDOW_CREATE_EXTERNAL_GRAPHICS_CONTEXT in SDL_CreateWindowWithProperties()
2024-02-12 09:54:33 -08:00
Sam Lantinga
2f7c24e4be Removed SDL_HINT_RENDER_SCALE_QUALITY
Textures now default to linear filtering, use SDL_SetTextureScaleMode(texture, SDL_SCALEMODE_NEAREST) if you want nearest pixel mode instead.
2024-02-12 09:54:33 -08:00
Sam Lantinga
20051f805f Removed SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4
Replaced with SDL_HINT_WINDOWS_CLOSE_ON_ALT_F4, defaulting to SDL_TRUE
2024-02-12 09:54:33 -08:00
Sam Lantinga
7cb1ca60ec Removed SDL_HINT_RENDER_OPENGL_SHADERS
Shaders are always used if they are available.
2024-02-12 09:54:33 -08:00
Sam Lantinga
9920e062d5 Removed SDL_HINT_THREAD_STACK_SIZE
The stack size can be specified using SDL_CreateThreadWithStackSize()
2024-02-12 09:54:33 -08:00
Sam Lantinga
9e505252c0 Renamed SDL_HINT_PS2_DYNAMIC_VSYNC SDL_HINT_RENDER_PS2_DYNAMIC_VSYNC 2024-02-12 09:54:33 -08:00
Sam Lantinga
a538936821 Renamed SDL_HINT_LINUX_JOYSTICK_DEADZONES to SDL_HINT_JOYSTICK_LINUX_DEADZONES 2024-02-12 09:54:33 -08:00
Sam Lantinga
980c379a0b Renamed SDL_HINT_LINUX_JOYSTICK_CLASSIC to SDL_HINT_JOYSTICK_LINUX_CLASSIC 2024-02-12 09:54:33 -08:00
Sam Lantinga
1f7936d545 Renamed SDL_HINT_LINUX_HAT_DEADZONES to SDL_HINT_JOYSTICK_LINUX_HAT_DEADZONES 2024-02-12 09:54:33 -08:00
Sam Lantinga
39cfb437ed Renamed SDL_HINT_LINUX_DIGITAL_HATS to SDL_HINT_JOYSTICK_LINUX_DIGITAL_HATS 2024-02-12 09:54:33 -08:00
Sam Lantinga
b557c15bcf Renamed SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE to SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE 2024-02-12 09:54:33 -08:00
Sam Lantinga
4f628b5b62 Renamed SDL_HINT_GDK_TEXTINPUT_DEFAULT to SDL_HINT_GDK_TEXTINPUT_DEFAULT_TEXT 2024-02-12 09:54:33 -08:00
Sam Lantinga
fd5d761128 Renamed SDL_HINT_DIRECTINPUT_ENABLED to SDL_HINT_JOYSTICK_DIRECTINPUT 2024-02-12 09:54:33 -08:00
Sam Lantinga
a5da7d0dd5 Renamed SDL_HINT_ALLOW_TOPMOST to SDL_HINT_WINDOW_ALLOW_TOPMOST 2024-02-12 09:54:33 -08:00
Sam Lantinga
9ce7fe2848 Removed SDL_HINT_ACCELEROMETER_AS_JOYSTICK
Sensors are a first-class object in SDL and we haven't gotten any feedback that this feature is useful these days.

Closes https://github.com/libsdl-org/SDL/pull/7879
2024-02-12 09:54:33 -08:00
Sam Lantinga
cacac6cc34 Updated structure and field names for consistency
Type names are camel case and field names are snake case except for fields ending in id, which are capitalized.

Fixes https://github.com/libsdl-org/SDL/issues/6955
2024-02-11 08:27:56 -08:00
Sam Lantinga
f95b7ee4da Renamed SDL_HasWindowSurface to SDL_WindowHasSurface
Fixes https://github.com/libsdl-org/SDL/issues/9034
2024-02-09 17:42:18 -08:00
Sam Lantinga
f6b92c9b88 Re-added a simplified version of SDL_SetWindowShape()
In order to handle mouse click transparency this needs to be implemented inside SDL
2024-02-09 16:04:46 -08:00