Sam Lantinga
dc280c17a0
Moved SDL_intrin.h back into the public headers for application use
2023-01-10 15:50:35 -08:00
Sylvain Becker
5066fcde69
Add SDL_migration.cocci for SDL2 to 3 migration ( #7042 )
...
* Add SDL_migration.cocci for SDL2 to 3 migration
2023-01-10 15:25:00 +01:00
Sam Lantinga
2aa9569b3e
Replaced SDL_SIMDAlloc(), SDL_SIMDRealloc(), and SDL_SIMDFree() with SDL_aligned_alloc() and SDL_aligned_free()
...
Fixes https://github.com/libsdl-org/SDL/issues/5641
2023-01-09 18:01:59 -08:00
Sam Lantinga
e9b86eebf3
Functions which return function pointers now return SDL_FunctionPointer instead of void*
...
This fixes the clang warning "Cast between pointer-to-function and pointer-to-object is an extension"
You can define SDL_FUNCTION_POINTER_IS_VOID_POINTER in your project to restore the previous behavior.
Fixes https://github.com/libsdl-org/SDL/issues/2866
2023-01-09 15:46:21 -08:00
Sam Lantinga
5feebcdce0
SDL_AddHintCallback() now returns a standard int result instead of void
...
Fixes https://github.com/libsdl-org/SDL/issues/7035
2023-01-09 12:09:30 -08:00
Anonymous Maarten
f91a747549
include: SDL_dynapi.h depends on platform defines
2023-01-08 21:37:54 +01:00
Sam Lantinga
9ffeae7b58
Added a migration note for SDL_Vulkan_GetInstanceExtensions()
2023-01-08 07:59:14 -08:00
Sylvain
93e2903ac5
Add SDL_PlayAudioDevice() to play audio. Remove pause_on param from SDL_PauseAudioDevice()
2023-01-06 09:15:39 -08:00
Sam Lantinga
26be384801
SDL_syswm.h provides the platform specific types by default again
...
You can enable and disable subsystems with SDL_ENABLE_SYSWM_*/SDL_DISABLE_SYSWM_* and you can disable the type forward declarations with SDL_DISABLE_SYSWM_*_TYPES
2023-01-05 23:50:37 -08:00
Sylvain
2d7f8d7d51
Remove legacy SDL_Audio functions that acts on device id == 1
2023-01-05 09:40:06 -05:00
Sam Lantinga
bb34441474
Provide a better real-world example of the SDL_RWread() API change
2023-01-05 00:48:44 -08:00
Sam Lantinga
c93f2f06c9
Updated release_checklist.md for SDL 3.0
2023-01-04 23:47:01 -08:00
Sam Lantinga
51a80d03ce
Be really explicit about needing to check for negative error codes with SDL_RWread()
2023-01-04 22:29:45 -08:00
Sam Lantinga
0901657278
Document renamed API functions in SDL_keyboard.h
2023-01-04 15:41:35 -08:00
Sam Lantinga
4f978456a8
Renamed SDL_GAMEPADDEVICEREMAPPED to SDL_GAMEPADREMAPPED
2023-01-04 14:32:37 -08:00
Sam Lantinga
c823f26f18
Revert "Removed public joystick locking API"
...
This reverts commit a515f51ac0
.
We still need joystick locking to protect the gamepad mappings
2023-01-04 13:51:40 -08:00
Sam Lantinga
e76c1d74bc
Added a python script to rename SDL2 headers to SDL3 headers
2023-01-04 11:20:38 -08:00
Sylvain
6863f0b2d8
Add SDL_WindowID type for SDL_Window id
2023-01-04 09:21:52 -08:00
Sam Lantinga
1d956c2817
Rename SDL2 tests for SDL3
2023-01-03 11:54:35 -08:00
Sam Lantinga
9c1a9ecb4b
Removed non-float versions of SDL render API drawing functions
...
This simplifies the API and removes a level of API translation between the int variants of the functions and the float implementation
Fixes https://github.com/libsdl-org/SDL/issues/6656
2023-01-03 08:16:58 -08:00
Sam Lantinga
e3c1749f5b
The refresh rate in SDL_DisplayMode is now a float
2023-01-03 06:35:25 -08:00
Sylvain Becker
8a13533949
Handle error return value for SDL_GetSwapInterval
2023-01-01 08:20:41 -08:00
Sam Lantinga
a515f51ac0
Removed public joystick locking API
...
All joystick functions are thread-safe and you can now get an atomic list of joysticks with SDL_GetJoysticks()
Fixes https://github.com/libsdl-org/SDL/issues/6956
2022-12-31 09:24:14 -08:00
Ryan C. Gordon
87c8e2b942
README-migration: Added backticks to avoid markdown highlighting.
2022-12-31 01:12:10 -05:00
Sam Lantinga
324c0b76a0
Removed SDL_HasGamepads(), SDL_HasJoysticks(), and SDL_HasSensors()
...
Also cleaned up logic for whether we need to poll for events:
- We need to periodically poll for joysticks to handle hotplug.
- We need to frequently poll for joysticks and sensors when they're open so their state can be updated
2022-12-29 23:20:26 -08:00
Sam Lantinga
cefbeb582f
Mouse coordinates are floating point
...
You can get sub-pixel mouse coordinates and motion depending on the platform and display scaling.
Fixes https://github.com/libsdl-org/SDL/issues/2999
2022-12-29 23:12:19 -08:00
Sam Lantinga
98678b5d8d
SDL API renaming: SDL_Alloc*/SDL_Free* -> SDL_Create*/SDL_Destroy*
...
Fixes https://github.com/libsdl-org/SDL/issues/6945
2022-12-29 15:07:15 -08:00
Sam Lantinga
1b90107fdb
Spell out "Float" in function names
2022-12-29 14:50:31 -08:00
Sam Lantinga
ce412c2c71
Consistency cleanup for README-migration.md
2022-12-29 10:44:54 -08:00
Sylvain
88630b85f5
SDL_GL_SwapWindow() returns an error code
2022-12-29 08:40:51 -08:00
Sam Lantinga
80890f3aae
SDL API renaming: SDL_render.h
...
Fixes https://github.com/libsdl-org/SDL/issues/6883
2022-12-28 19:40:25 -08:00
Sam Lantinga
ea0c2f55be
SDL API renaming: *Is* functions
...
Feedback from @icculus:
"IsTablet" uses "is" as a form of "to be" ...like, the actual question is of its nature.
The rest is just a superfluous word in the question and it flows as better English with if (RectEmpty) than if (IsRectEmpty)
Fixes https://github.com/libsdl-org/SDL/issues/6932
2022-12-28 19:40:25 -08:00
Sam Lantinga
66351fd4ba
Replace tri-state functions SDL_EventState(), SDL_GetJoystickEventState(), SDL_GetGamepadEventState(), SDL_ShowCursor()
...
`SDL_QUERY`, `SDL_IGNORE`, `SDL_ENABLE`, and `SDL_DISABLE` have been removed.
SDL_EventState() has been replaced with SDL_SetEventEnabled()
SDL_GetEventState() has been replaced with SDL_EventEnabled()
SDL_GameControllerEventState has been replaced with SDL_SetGamepadEventsEnabled() and SDL_GamepadEventsEnabled()
SDL_JoystickEventState has been replaced with SDL_SetJoystickEventsEnabled() and SDL_JoystickEventsEnabled()
SDL_ShowCursor() has been split into three functions: SDL_ShowCursor(), SDL_HideCursor(), and SDL_CursorVisible()
Fixes https://github.com/libsdl-org/SDL/issues/6929
2022-12-28 17:49:34 -08:00
Sam Lantinga
16092f58bb
Updated gamepad, joystick, sensor APIs, removing device indices
...
Instead of indexing into an internal list of devices which requires locking, we return a list of device IDs which can then be queried individually.
Reference: https://github.com/libsdl-org/SDL/issues/6889
2022-12-28 13:10:27 -08:00
Sylvain
639a744ac4
Update README-migration
2022-12-28 12:16:57 -08:00
Sylvain
aa46ff8f4b
Remove SDL_WINDOW_SHOW flag, as redundant with SDL_WINDOW_HIDDEN
2022-12-28 12:16:57 -08:00
Sam Lantinga
ab2d007982
More gamepad renaming
2022-12-27 11:31:54 -08:00
Sam Lantinga
58aecf0a54
SDL API renaming: SDL_rect.h
...
Fixes https://github.com/libsdl-org/SDL/issues/6887
2022-12-27 11:01:11 -08:00
Sam Lantinga
5baed331f1
Don't add symbol renaming to WhatsNew.txt
2022-12-27 10:00:10 -08:00
Sam Lantinga
659abc721a
SDL API renaming: SDL_gamecontroller.h
...
SDL_gamecontroller.h has been renamed SDL_gamepad.h, and all APIs have been renamed to match.
Fixes https://github.com/libsdl-org/SDL/issues/6885
2022-12-27 09:47:24 -08:00
Sam Lantinga
c6969df4d7
SDL API renaming: SDL_video.h
...
Fixes https://github.com/libsdl-org/SDL/issues/6880
2022-12-27 06:38:34 -08:00
Sam Lantinga
cc0296c934
SDL API renaming: SDL_surface.h
...
Fixes https://github.com/libsdl-org/SDL/issues/6884
2022-12-27 06:36:39 -08:00
Sam Lantinga
2db699f48e
SDL API renaming: SDL_sensor.h
...
Fixes https://github.com/libsdl-org/SDL/issues/6888
2022-12-27 06:23:39 -08:00
Sam Lantinga
0d54115235
SDL API renaming: SDL_render.h
...
Fixes https://github.com/libsdl-org/SDL/issues/6883
2022-12-27 06:21:13 -08:00
Sam Lantinga
083e436a1a
SDL API renaming: SDL_pixels.h
...
Fixes https://github.com/libsdl-org/SDL/issues/6886
2022-12-27 06:08:31 -08:00
Sam Lantinga
fc478c1bc0
SDL API renaming: SDL_joystick.h
...
Fixes https://github.com/libsdl-org/SDL/issues/6881
2022-12-27 05:50:46 -08:00
Sylvain Becker
aa0053141b
Remove SDL_VideoInit / Quit. Prefer SDL_SubSytemInit / Quit ( #6913 )
2022-12-27 05:42:48 -08:00
Sam Lantinga
713ba2e31a
SDL API renaming: SDL_audio.h
...
Fixes https://github.com/libsdl-org/SDL/issues/6879
2022-12-27 05:32:55 -08:00
Sam Lantinga
9625fb2832
Documentation cleanup
2022-12-27 05:28:18 -08:00
Sylvain Becker
47170d288e
Don't export SDL_AudioInit/Quit, use SDL_InitSubsystem instead ( #6912 )
...
* Don't export SDL_AudioInit/Quit, use SDL_InitSubsystem instead
* Update README
Co-authored-by: Sam Lantinga <slouken@libsdl.org>
2022-12-27 05:22:22 -08:00