Commit Graph

660 Commits

Author SHA1 Message Date
Sam Lantinga
9fe384b696 Fixed display orientation function names for SDL 3.0 convention 2023-06-17 09:28:27 -07:00
Sam Lantinga
e6d1ba2a17 Added the concept of display natural orientation
Also renamed SDL_GetDisplayOrientation() SDL_GetDisplayCurrentOrientation()

The natural orientation of the primary display is the frame of reference for accelerometer and gyro sensor readings.
2023-06-17 07:42:16 -07:00
SDL Wiki Bot
739f78302b Sync SDL3 wiki -> header 2023-06-16 12:22:18 +00:00
Anonymous Maarten
26df689935 docs: expand CMake documentation + add minimal CMake project for reporting issues 2023-06-16 14:21:38 +02:00
Frank Praznik
2f75596d5a Consolidate the X11 WM_CLASS and Wayland app ID envvars
Consolidate the X11_WMCLASS and WAYLAND_WMCLASS envvars into one SDL_HINT_APP_ID hint. This hint serves the same purpose on both windowing systems to allow desktop compositors to identify and group windows together, as well as associate applications with their desktop settings and icons.

The common code for retrieving the value is now consolidated under core/unix/SDL_appid.c as it's common to *nix platforms, and the value is now retrieved at window creation time instead of being cached by the video driver at startup so that changes to the hint after video initialization and before window creation will be seen, as well as to accommodate cases where applications want to use different values for different windows.
2023-05-28 19:15:36 -04:00
Sam Lantinga
cb73bed6eb SDL API renaming: SDL TLS functions
Fixes https://github.com/libsdl-org/SDL/issues/7743
2023-05-26 08:33:15 -07:00
Sam Lantinga
e61b5ceefe The SDL_WINDOW_ALLOW_HIGHDPI flag has been renamed SDL_WINDOW_HIGH_PIXEL_DENSITY 2023-05-18 07:34:45 -07:00
Sam Lantinga
cc94f600fd Officially added the concept of window pixel density
The SDL_WINDOW_ALLOW_HIGHDPI flag has been renamed SDL_WINDOW_HIGH_PIXEL_DENSITY, and added the function SDL_GetWindowPixelDensity()
2023-05-17 17:54:03 -07:00
SDL Wiki Bot
5836e057de Sync SDL3 wiki -> header 2023-05-17 19:59:14 +00:00
Sam Lantinga
c699f3d1d8 Updated SDL high DPI support
We have gotten feedback that abstracting the coordinate system based on the display scale is unexpected and it is difficult to adapt existing applications to the proposed API.

The new approach is to provide the coordinate systems that people expect, but provide additional information that will help applications properly handle high DPI situations.

The concepts needed for high DPI support are documented in README-highdpi.md. An example of automatically adapting the content to display scale changes can be found in SDL_test_common.c, where auto_scale_content is checked.

Also, the SDL_WINDOW_ALLOW_HIGHDPI window flag has been replaced by the SDL_HINT_VIDEO_ENABLE_HIGH_PIXEL_DENSITY hint.

Fixes https://github.com/libsdl-org/SDL/issues/7709
2023-05-17 12:58:00 -07:00
Sam Lantinga
4de7433a9e Use the term "points" instead of "screen coordinates"
It turns out that screen coordinates were confusing people, thinking that meant pixels, when instead they are virtual coordinates; device independent units defined as pixels scaled by the display scale. We'll use the term "points" for this going forward, to reduce confusion.
2023-05-15 11:20:38 -07:00
SDL Wiki Bot
78251f973d Sync SDL3 wiki -> header 2023-05-13 16:55:14 +00:00
Frank Praznik
12e1b2546a docs: Add README-wayland
Add a README file for Wayland that lists common issues and limitations.
2023-05-13 12:54:14 -04:00
Sylvain
dfd80f3d76 Android: control activity re-creation 2023-05-12 07:48:33 -07:00
Brick
079ae065f1 Added SDL prefix AUDIO_* constants 2023-05-02 08:09:06 -07:00
Eric
f7df966b41 SDL_JOYBALLMOTION 2023-04-28 23:35:33 -04:00
Eric
e8c16ce483 Update migration guide with info on trackballs 2023-04-28 23:35:33 -04:00
Sam Lantinga
87ad71f9b2 Rename SDL mutex, semaphore and condition variable types to match SDL 3.0 naming convention 2023-04-28 12:08:33 -07:00
Sam Lantinga
61c0c009ab Rename SDL semaphore and condition variable functions to match SDL 3.0 naming convention
Fixes https://github.com/libsdl-org/SDL/issues/7642
2023-04-28 12:08:33 -07:00
Ryan C. Gordon
e5a6c24c82 audio: Redesigned audio conversion code for SDL3.
- SDL_AudioCVT is gone, even internally.
- libsamplerate is gone (I suspect our resampler is finally Good Enough).
- Cleanups and improvements to audio conversion interfaces.
- SDL_AudioStream can change its input/output format/rate/channels on the fly!
2023-04-27 18:35:15 -04:00
Sam Lantinga
2aa2fa5449 Added SDL_CreateWindowWithPosition()
It turns out there's a race condition on X11 where the window could be placed by the window manager while being placed by the application, so we need to have the initial position available at window creation.
2023-03-31 17:21:44 -07:00
Elad Lahav
4b17cc3a46 Add CMake toolchain files 2023-03-27 15:33:08 -07:00
SDL Wiki Bot
8c852f4dcf Sync SDL3 wiki -> header 2023-03-25 22:11:16 +00:00
Karl Hedberg
11142ec256
Made the Android documentation more clear and understandable (#7535) 2023-03-25 15:10:04 -07:00
SDL Wiki Bot
6760d54737 Sync SDL3 wiki -> header 2023-03-21 20:04:18 +00:00
Anonymous Maarten
6a9e2495f0 docs: add general information on how to build optimized binaries 2023-03-21 23:03:02 +03:00
Frank Praznik
5a0f50e1c3 docs: Update the migration document with changes to the tooltips and popup menu flags. 2023-03-10 15:51:13 -08:00
David Demelier
d0c4849d0b Rename SDL_atomic_t to SDL_AtomicInt 2023-03-09 09:00:09 -08:00
Sam Lantinga
698dbd8464 SDL_CreateWindow() has been simplified and no longer takes a window position. 2023-03-06 09:50:12 -08:00
Sam Lantinga
d5775f6708 The gamepad event structures caxis, cbutton, cdevice, ctouchpad, and csensor have been renamed gaxis, gbutton, gdevice, gtouchpad, and gsensor.
Fixes https://github.com/libsdl-org/SDL/issues/7375
2023-03-01 09:48:28 -08:00
Ryan C. Gordon
f48d0cc164
audio: Remove AUDIO_U16* support.
It wasn't heavily used, and you can't use memset to silence a U16 buffer.

Fixes #7380.
2023-03-01 10:26:01 -05:00
Sam Lantinga
941a603665 Document that SDL_IsScreenSaverEnabled() was renamed SDL_ScreenSaverEnabled() 2023-02-28 15:56:49 -08:00
Ryan C. Gordon
5d3234d8ae
docs: Removed bogus file from wiki bridge.
That was fixed to not do that again by 7e429a13d3
2023-02-28 13:39:43 -05:00
SDL Wiki Bot
c3d2f5368b Sync SDL3 wiki -> header 2023-02-28 17:50:11 +00:00
SDL Wiki Bot
3f49e370c8 Sync SDL3 wiki -> header 2023-02-28 17:39:22 +00:00
Ryan C. Gordon
5585a4ac72
Renamed CONTRIBUTING.md to README-contributing.md
This lets the wiki bridge pick it up.
2023-02-28 12:38:31 -05:00
Ryan C. Gordon
7b9b20e684
docs: Deleting a bogus file to see if wiki bridge rebuilds it. 2023-02-28 12:31:11 -05:00
SDL Wiki Bot
60127460b0 Sync SDL3 wiki -> header 2023-02-28 17:30:22 +00:00
SDL Wiki Bot
5fb5586233 Sync SDL3 wiki -> header 2023-02-28 17:18:06 +00:00
Ryan C. Gordon
6d1e14b792
wikiheaders: ignore wiki's README/FrontPage.md 2023-02-28 11:55:19 -05:00
SDL Wiki Bot
90a911b31f Sync SDL3 wiki -> header 2023-02-28 16:52:06 +00:00
SDL Wiki Bot
af9a2237e3 Sync SDL3 wiki -> header 2023-02-28 16:48:26 +00:00
Anonymous Maarten
0625695898 docs: Fix doxyfile 2023-02-19 10:01:33 -08:00
Sam Lantinga
24d419c09f Updated documentation for SDL3_DYNAMIC_API
Fixes https://github.com/libsdl-org/SDL/issues/7347
2023-02-19 09:54:47 -08:00
Anonymous Maarten
dc138ee3d4 cmake: SDL3-shared target will always be a shared target 2023-02-17 23:42:03 +01:00
Sam Lantinga
96722a5809 Ubuntu 18.04 doesn't have a new enough version of Wayland for SDL, so update documentation appropriately
Reference https://github.com/libsdl-org/SDL/issues/7271
2023-02-16 08:57:53 -08:00
Sylvain
26f27a9e5a Update README-migration 2023-02-10 09:30:31 +01:00
Sam Lantinga
5b77ad54c4 Fixed order and constness of parameters to SDL_ConvertAudioSamples() 2023-02-09 17:49:35 -08:00
Sam Lantinga
824b9b0a58 Removed SDL_GetDisplayDPI()
This function wasn't consistently correct across platforms and devices.

If you want the UI scale factor, you can use display_scale in the structure returned by SDL_GetDesktopDisplayMode(). If you need an approximate DPI, you can multiply this value times 160 on iPhone and Android, and 96 on other platforms.
2023-02-08 17:35:54 -08:00
Sam Lantinga
d563f38a0d Note that the renderer will by default scale from window coordinates to pixels 2023-02-05 08:41:35 -08:00
Sam Lantinga
a34a84ba98
Rename int versions of the SDL2 render functions (#7235)
This makes it clear what the new versions are, and in the case of SDL_RenderDrawPoint() and SDL_RenderDrawLine(), the coccinelle script actually does the (float) casts for you.
2023-02-03 14:55:32 -08:00
Sam Lantinga
14a4ce8b59 Fixed SDL_ScaleMode values for consistency 2023-02-03 14:20:51 -08:00
Sam Lantinga
dcd17f5473 Renderer logical size is now implemented as a render target
This fixes rounding errors with coordinate scaling and gives more flexibility in the presentation, as well as making it easy to maintain device independent resolution as windows move between different pixel density displays.

By default when a renderer is created, it will match the window size so window coordinates and render coordinates are 1-1.

Mouse and touch events are no longer filtered to change their coordinates, instead you can call SDL_ConvertEventToRenderCoordinates() to explicitly map event coordinates into the rendering viewport.

SDL_RenderWindowToLogical() and SDL_RenderLogicalToWindow() have been renamed SDL_RenderCoordinatesFromWindow() and SDL_RenderCoordinatesToWindow() and take floating point coordinates in both directions.

The viewport, clipping state, and scale for render targets are now persistent and will remain set whenever they are active.
2023-02-03 12:57:37 -08:00
Anonymous Maarten
69aede6c9e Add missing _ in SDL_EVENT_LOCALECHANGED and SSDL_EVENT_TEXTEDITING_EXT 2023-02-02 00:49:09 +01:00
Sam Lantinga
ac75fe9324 Folded SDL_WINDOW_FULLSCREEN_EXCLUSIVE and SDL_WINDOW_FULLSCREEN_DESKTOP into a single SDL_WINDOW_FULLSCREEN flag
The fullscreen video mode used by the window can be used to determine whether it's in exclusive fullscreen or fullscreen desktop mode.
2023-02-01 12:05:25 -08:00
Sam Lantinga
6b137579ea Windows default to fullscreen desktop mode if they don't pick an explicit video mode
Rather than iterating over display modes using an index, there is a new function SDL_GetFullscreenDisplayModes() to get the list of available fullscreen modes on a display.
{
    SDL_DisplayID display = SDL_GetPrimaryDisplay();
    int num_modes = 0;
    SDL_DisplayMode **modes = SDL_GetFullscreenDisplayModes(display, &num_modes);
    if (modes) {
        for (i = 0; i < num_modes; ++i) {
            SDL_DisplayMode *mode = modes[i];
            SDL_Log("Display %" SDL_PRIu32 " mode %d:  %dx%d@%gHz, %d%% scale\n",
                    display, i, mode->pixel_w, mode->pixel_h, mode->refresh_rate, (int)(mode->display_scale * 100.0f));
        }
        SDL_free(modes);
    }
}

SDL_GetDesktopDisplayMode() and SDL_GetCurrentDisplayMode() return pointers to display modes rather than filling in application memory.

Windows now have an explicit fullscreen mode that is set, using SDL_SetWindowFullscreenMode(). The fullscreen mode for a window can be queried with SDL_GetWindowFullscreenMode(), which returns a pointer to the mode, or NULL if the window will be fullscreen desktop. SDL_SetWindowFullscreen() just takes a boolean value, setting the correct fullscreen state based on the selected mode.
2023-02-01 12:05:25 -08:00
Bruno Sanches
7c085862e1 SDL_Video.h - audio driver
I believe you intend to say "video driver", not audio driver
2023-01-30 08:13:16 -08:00
Sam Lantinga
22c69bccdf Displays are now referenced by instance ID instead of index 2023-01-29 19:25:15 -08:00
Anonymous Maarten
758c0dd6d8 Rename mouse BUTTON(DOWN|UP) event to BUTTON_(DOWN|UP) 2023-01-29 19:24:48 -08:00
Sasha Szpakowski
90795291e4 Remove SDL_GL/Metal/Vulkan_GetDrawableSize().
SDL_GetWindowSizeInPixels supersedes those functions.
2023-01-29 11:20:33 -08:00
Sam Lantinga
bf4095359c Removed duplicated window size events, and added SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED 2023-01-28 15:56:02 -08:00
Sam Lantinga
31f464153d SDL_WINDOW_INPUT_GRABBED has been renamed SDL_WINDOW_MOUSE_GRABBED 2023-01-28 10:56:38 -08:00
Sam Lantinga
e83c54f271 SDL_WINDOW_FULLSCREEN and SDL_WINDOW_FULLSCREEN_DESKTOP are now distinct flags 2023-01-28 10:56:38 -08:00
Sam Lantinga
24fec13ac1 Add full high DPI information to SDL_DisplayMode
SDL_DisplayMode now includes the pixel size, the screen size and the relationship between the two. For example, a 4K display at 200% scale could have a pixel size of 3840x2160, a screen size of 1920x1080, and a display scale of 2.0.
2023-01-27 12:38:46 -08:00
Sam Lantinga
6240252736 Updated documentation with the SDL_WINDOW_ALLOW_HIGHDPI flag removal 2023-01-25 01:28:37 -08:00
Sylvain
724d92fd65 Rename SDL_GetDisplayDPI to SDL_GetDisplayPhysicalDPI
to avoid confusion with logical DPI
2023-01-25 00:04:00 -08:00
Sam Lantinga
a06a593aa6 Renamed SDL_GetGamepadNumTouchpads and SDL_GetGamepadNumTouchpadFingers to match the new convention 2023-01-24 13:47:30 -08:00
Ozkan Sezer
58e8cf599c README-migration.md: fix SDL_WINDOWEVENT_CLOSE renamed name.
SDL_EVENT_WINDOW_CLOSE_REQUESTED, not SDL_EVENT_WINDOW_CLOSE.
2023-01-24 20:05:50 +03:00
Sylvain
052b14eb65 Add SDL_ConvertAudioSamples() helper function 2023-01-24 08:26:09 -08:00
Sam Lantinga
7b50bae524 Renamed SDL events for clarity
Fixes https://github.com/libsdl-org/SDL/issues/6877
2023-01-24 07:26:48 -08:00
Sylvain
b1f365374b Add code snipped to migrate from AudioCVT interface 2023-01-22 22:22:50 +01:00
Sam Lantinga
9c8642ded9 Removed SDL_INIT_NOPARACHUTE
Fixes https://github.com/libsdl-org/SDL/issues/7121
2023-01-22 09:14:12 -08:00
Sylvain
e4fdf42097 Update README-migration.md 2023-01-22 11:31:30 -05:00
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
Sylvain
3fb0c8b54a Remove/Rename SDL_FreeWAV() to SDL_free() 2022-12-27 05:14:52 -08:00
Sam Lantinga
63724c113b Removed the vi format comments from the source
Vim users can use the [editorconfig plugin](https://github.com/editorconfig/editorconfig-vim) to automatically set tab spacing for the SDL coding style.

Fixes https://github.com/libsdl-org/SDL/issues/6903
2022-12-26 11:17:23 -08:00
Frank Praznik
abdfa809db Prepend key modifier enum values with 'SDL_' 2022-12-23 20:35:49 -08:00
Sam Lantinga
fd0631fd35 Added documentation for rename_symbols.py 2022-12-23 15:58:15 -08:00
Sam Lantinga
759f98085a Used rename_api.py to add previously renamed symbols to SDL_oldnames.h 2022-12-23 15:08:30 -08:00
Ryan C. Gordon
1cf2b566af cpu: Removed 3DNow! support and SDL_Has3DNow().
Reference Issue #6636.
2022-12-23 09:30:56 -08:00
meyraud705
126c60cb45 Add "SDL_" prefix to RW_SEEK macros 2022-12-23 09:25:37 -08:00
Sam Lantinga
1a80fbaae4 Moved the header sections into alphabetical order in README-migration.md 2022-12-22 17:06:46 -08:00
Ryan C. Gordon
3197632347
include: Renamed begin_code.h and close_code.h to have SDL_ prefixes.
Fixes #6864.
2022-12-22 11:39:26 -05:00
Sam Lantinga
909b513c33 Made SDL_WINDOWEVENT_* and SDL_DISPLAYEVENT_* first class event types
Fixes https://github.com/libsdl-org/SDL/issues/6772
2022-12-22 07:38:13 -08:00
Ryan C. Gordon
182806e39f
docs: Updated migration notes for SDL_RWops. 2022-12-22 00:55:54 -05:00
Ryan C. Gordon
d927befcd7
docs: Just adjusting some link text. 2022-12-17 13:06:44 -05:00
Ryan C. Gordon
7b25f04476
README-migration.md: Point to the SDL_gesture repository. 2022-12-17 13:05:00 -05:00
Ryan C. Gordon
3b5780ba0a
README-migration.md: Updated stdio RWops example code for new API. 2022-12-17 13:05:00 -05:00
Daniel Gibson
ab554c8392 Update doc/README-* for header-only SDL_main 2022-12-15 08:01:01 -08:00
Daniel Gibson
2aee3e654d Remove SDL_main from VS Solutions in VisualC/ and VisualC-GDK/
and update README-visualc.md and README-gdk.md accordingly

Also moved src/main/windows/version.rc to src/core/windows/
and adjusted VS solutions, CMakeLists.txt and versioning scripts
in build-scripts/ accordingly.

This will eventually allow us to remove all of src/main/

# Conflicts:
#	VisualC/tests/testgesture/testgesture.vcxproj
2022-12-15 08:01:01 -08:00
Daniel Gibson
28b93451dc Make WinRT's SDL_main header-only
As the implementation requires C++, the user will have to include
SDL_main.h in a C++ source file (that needs to be compiled with /ZW).
It's ok to keep the standard main() implementation in plain C and use
an otherwise empty C++ source file for the SDL_main implementation part,
if both source files #include <SDL3/SDL_main.h>

Including SDL_main.h in a C source file will print a message at
compilation (when building for WinRT or possibly other not yet implemented
platforms that require C++ for main), to remind the user of also
including it in a .cpp source file. This message/warning can be disabled
with #define SDL_MAIN_NOIMPL before including SDL_main.h in the C file.
When including it in a .cpp file, there will be a compiler error with
helpful message if it's not compiled with /ZW

For this I renamend _SDL_MAIN_NOIMPL to SDL_MAIN_NOIMPL, because now it's
not for internal use only anymore, but also useful for users (that want
their main() function in a different file than the SDL_main implementation)

Add a project for the testdraw2.c test to the WinRT solution to at least
get some minimal testing on WinRT.
I won't add all tests because it's a lot of manual clicking per test,
but this should be better than nothing :)
2022-12-15 08:01:01 -08:00
Daniel Gibson
8e0693c982 Make iOS/tvOS (uikit) SDL_main header-only
Also adjusted iOS demo's includes to <SDL3/..> and explicit SDL_main.h

untested, I don't have Xcode (or a Mac, for that matter)

The xcode projects (for both Xcode-iOS/ and Xcode/) will probably
have to be adjusted for the SDL_main changes to work, but now at least
the iOS demo source should work as is :)
2022-12-15 08:01:01 -08:00
Daniel Gibson
28ecbbf0b5 Make GDK's SDL_main header-only 2022-12-15 08:01:01 -08:00
Ryan C. Gordon
5a2d0b69c8
render: Remove SDL_GetRenderDriverInfo and change SDL_CreateRenderer.
Fixes #6625.
2022-12-13 23:27:35 -05:00
Ryan C. Gordon
a76053352c
gesture: Removed the gesture API from SDL3.
Fixes #6758.
2022-12-13 14:54:37 -05:00
Pierre Wendling
053ce39d67
N3DS: Semaphore fixes. (#6776)
* N3DS: Make Sem waits cooperative friendly.

The 3DS has a cooperative threading model. Sleeping after TryWait and
WaitTimeout avoid starving other threads. It inccurs a runtime penalty,
but it's better than having to hard reset your console to recover from
a deadlock.
2022-12-11 11:27:16 -08:00
Sylvain
c265fb74b0 Renamed AUDIODRIVER and VIDEODRIVER hint/env to AUDIO_DRIVER and VIDEO_DRIVER 2022-12-08 09:50:09 -05:00
Ryan C. Gordon
7ca0d15d64
events: Changed SDL_GetEventState from a macro to a function.
Fixes #6773.
2022-12-08 00:08:51 -05:00
Cameron Cawley
ee0e9e979c Move intrinsic includes into a private header 2022-12-04 09:34:10 -08:00
Sam Lantinga
b4da4ed95a Removed SDL_SensorGetDataWithTimestamp() and SDL_GameControllerGetSensorDataWithTimestamp()
If you care about timestamps you'll also want to catch all of the sensor events instead of just polling the current state. For example, Nintendo Switch controllers generate 3 sensor events with distinct values for each polling interval.
2022-12-04 09:29:28 -08:00
Sam Lantinga
b8760a3ffe The timestamp_us member of the sensor events has been renamed sensor_timestamp and now represents nanoseconds. 2022-12-04 09:29:28 -08:00
Sam Lantinga
0a3262e819 Pass the OS event timestamp for keyboard, mouse, and touch events where possible
Currently implemented for Windows and Apple platforms
2022-12-02 12:37:41 -08:00
Sam Lantinga
8121bbd083 Convert ticks to 64-bit, added nanosecond precision to the API
Fixes https://github.com/libsdl-org/SDL/issues/5512
Fixes https://github.com/libsdl-org/SDL/issues/6731
2022-12-02 12:37:41 -08:00
Sylvain Becker
ab1f4172e3
Remove SDL_GL_CONTEXT_EGL #6657 (#6683) 2022-12-01 14:53:37 -08:00
Sam Lantinga
a463aca0d1 Simplified SDL_CreateRGBSurface* functions 2022-12-01 08:53:14 -08:00
Sam Lantinga
1e7e25626b Use SDL_PIXELFORMAT_RGB565, which is the most common 16-bit format 2022-12-01 08:34:41 -08:00
Sam Lantinga
a01759f8f0 Fixed 16-bit RGBA masks 2022-12-01 08:32:57 -08:00
Sam Lantinga
c30b2063e0 Clarified the migration path for SDL_CreateSurface() 2022-12-01 08:26:32 -08:00
Sylvain Becker
932f61348d
Remove mask versions of SDL_CreateRGBSurface* #6701 (#6711)
* Rename SDL_CreateRGBSurface{,From} to SDL_CreateSurface{,From}, which now takes a format parameter
2022-12-01 08:04:02 -08:00
Sylvain Becker
fc4fc5295f
Remove depth field from SDL_CreateRGBSurfaceWithFormat and SDL_Create… (#6685)
* 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
2022-11-29 09:40:09 -08:00
Sam Lantinga
c2432f8d0d Rename SDLmain to SDL_main and SDLtest to SDL_test for consistency with other SDL libraries 2022-11-28 10:57:59 -08:00
Sam Lantinga
2af4f74e1c Remove sdl3.m4 and sdl3-config, and document pkg-config as the recommended replacement
Fixes https://github.com/libsdl-org/SDL/issues/6639
2022-11-27 14:11:06 -08:00
Sasha Szpakowski
80a9397459 Remove SDL_HINT_IDLE_TIMER_DISABLED.
SDL_DisableScreenSaver can be used instead. Fixes #6660.
2022-11-27 08:23:02 -08:00
Sam Lantinga
0a48abc860 Switch header convention from #include "SDL.h" to #include <SDL3/SDLh>
I ran this script in the include directory:
```sh
sed -i '' -e 's,#include "\(SDL.*\)",#include <SDL3/\1>,' *.h
```

I ran this script in the src directory:
```sh
for i in ../include/SDL3/SDL*.h
do hdr=$(basename $i)
   if [ x"$(echo $hdr | egrep 'SDL_main|SDL_name|SDL_test|SDL_syswm|SDL_opengl|SDL_egl|SDL_vulkan')" != x ]; then
        find . -type f -exec sed -i '' -e 's,#include "\('$hdr'\)",#include <SDL3/\1>,' {} \;
    else
        find . -type f -exec sed -i '' -e '/#include "'$hdr'"/d' {} \;
    fi
done
```

Fixes https://github.com/libsdl-org/SDL/issues/6575
2022-11-26 22:15:18 -08:00
Sam Lantinga
63f307fe1f Remove SDL_config.h from the public headers
The SDL headers are no longer dependent on the build configuration.

Fixes https://github.com/libsdl-org/SDL/issues/6643 and https://github.com/libsdl-org/SDL/issues/6641
2022-11-26 04:48:36 -08:00
Sam Lantinga
5cfd26d0b9 Removed obsolete android-project-ant 2022-11-25 16:03:29 -08:00
Sam Lantinga
cc1f9eb983 Use Apple's nomenclature for macOS and iOS
Fixes https://github.com/libsdl-org/SDL/issues/6621
2022-11-25 16:00:06 -08:00
Sam Lantinga
5fb3eb9475 Update docs/README-porting.md
Co-authored-by: Cameron Cawley <ccawley2011@gmail.com>
2022-11-25 15:37:30 -08:00
Sam Lantinga
597e6a685b Update docs/README-macos.md
Co-authored-by: Cameron Cawley <ccawley2011@gmail.com>
2022-11-25 15:37:30 -08:00
Sam Lantinga
7661725b48 Update docs/README-riscos.md
Co-authored-by: Cameron Cawley <ccawley2011@gmail.com>
2022-11-25 15:37:30 -08:00
Anonymous Maarten
bdb416e4f3 docs: remove references to configure build systems from documentation 2022-11-25 15:37:30 -08:00
Frank Praznik
873ec097ea x11: Remove deprecated/defunct X11 hints
SDL_HINT_VIDEO_X11_FORCE_EGL was deprecated in favor of the more general SDL_HINT_VIDEO_FORCE_EGL, and Xinerama and Xvidmode support was previously removed from SDL, rendering their associated hints nonfunctional.
2022-11-25 13:46:47 -08:00
Sam Lantinga
346eeba210 Removed SDL_GetRevisionNumber()
Fixes https://github.com/libsdl-org/SDL/issues/6620
2022-11-25 13:36:14 -08:00
slime
ac8fbb7040 Remove SDL_CalculateGammaRamp. 2022-11-25 13:28:56 -08:00
slime
52f4cc843d Remove SDL_SetWindowBrightness and SDL_SetWindowGammaRamp. 2022-11-25 13:28:56 -08:00
Ozkan Sezer
0b8309da0c renamed SDL PI constants to SDL_PI_D and SDL_PI_F. 2022-11-25 22:35:24 +03:00
Sam Lantinga
05139f4a2e Removed SDL_RWFromFP from the public API
This will blow up if the SDL library and the application have a different C runtime, which can easily happen on Windows.
2022-11-25 10:46:26 -08:00
Sam Lantinga
670f1df469 Removed SDL_stdinc.h dependency on HAVE_M_PI, added SDL_M_PIl (double) and SDL_M_PIf (float) instead 2022-11-25 10:33:37 -08:00
Sam Lantinga
b0840eb32e Updated SDL_syswm.h for SDL 3.0
* The header is no longer dependent on SDL build configuration
* The structures are versioned separately from the rest of SDL
* SDL_GetWindowWMInfo() now returns a standard result code and is passed the version expected by the application
* Updated WhatsNew.txt and docs/README-migration.md with the first API changes in SDL 3.0
2022-11-23 14:05:59 -08:00
Sam Lantinga
a635a485bc Re-added WinRT support until we're sure that it's no longer being used 2022-11-23 10:41:43 -08:00
Ozkan Sezer
34231f5ba0 reverted opengles removal. 2022-11-23 18:50:02 +03:00
Ozkan Sezer
016b757311 reverted jack audio backend removal. 2022-11-23 06:50:20 +03:00
Ozkan Sezer
dc2a3e06e9 removed WinRT support. 2022-11-22 23:36:24 +03:00
Ozkan Sezer
30b1ab2add removed opengles. 2022-11-22 21:48:40 +03:00
Ozkan Sezer
be6853b6f1 removed WinCE readmes. 2022-11-22 20:51:50 +03:00
Ozkan Sezer
3cccaeba6c removed jack audio remnants. 2022-11-22 20:51:07 +03:00
Ozkan Sezer
3aea865cdf removed directfb support. 2022-11-22 20:45:45 +03:00
Ozkan Sezer
e89a1f9157 removed NaCL support. 2022-11-22 20:10:47 +03:00
Cameron Cawley
05e2c8f2ce Update README-riscos.md to reflect that atomic functions have been fixed 2022-11-22 08:32:18 -08:00
Ozkan Sezer
8d6fda4810 removed os2 support & support for building SDL with watcom. 2022-11-22 19:18:47 +03:00
Ozkan Sezer
63243eb3a5 removed pandora support 2022-11-22 18:50:00 +03:00
Sam Lantinga
2c4159b99a First pass at changing SDL 2.0 to SDL 3.0 2022-11-21 20:28:58 -08:00
Pierre Wendling
dcfa127fd4 N3DS: Document the SDL_GetBasePath behaviour. 2022-11-14 21:24:10 -08:00
Ryan C. Gordon
0ddec7e421
docs: Add notes about Emscripten audio quirks.
Fixes #6385.
2022-10-28 16:08:23 -04:00
Pierre Wendling
c7c0e81c1c N3DS: Update README. 2022-10-10 08:50:59 -07:00
Pierre Wendling
655275378d N3DS port (squashed)
A dedicated renderer using Citro3D would likely allow for better
much better graphical performances.
2022-10-10 08:50:59 -07:00
Sam Lantinga
5490505a2b Added a note to update the website after a stable release 2022-10-08 09:41:10 -07:00
slime
f8f562dace iOS: remove dead pre-iOS 8 codepaths.
SDL hasn't supported those older iOS versions for a little while now.
2022-10-02 19:57:46 -07:00
Ryan C. Gordon
1b895912a2 docs: Note the lowest supported Emscripten version.
Reference Issue #6304.
2022-09-30 14:23:54 -04:00
Ryan C. Gordon
508cc225a7
Update README.md 2022-09-28 10:17:39 -04:00
Ryan C. Gordon
d843d61cc1
Moved test/versioning.sh to build-scripts/test-versioning.sh
Reference Issue #6171.
2022-09-28 09:09:43 -04:00
Ryan C. Gordon
8e14647759
build-scripts: Added update-version.sh
Fixes #6171.
2022-09-27 22:04:07 -04:00
tjpadula
a0f143fc93
Add build target to Xcode project to create an xcframework for iOS (#6188) 2022-09-05 13:10:15 -07:00
Sam Lantinga
23be3ccc2f Note that we should regenerate configure before running test/versioning.sh 2022-09-05 11:25:10 -07:00
Sam Lantinga
acf397b4df Actually, DYLIB_COMPATIBILITY_VERSION shouldn't be updated for a stable point release
@smcv
2022-09-05 11:21:13 -07:00
Sam Lantinga
5cac6c7eb6 Note that the Xcode DYLIB_COMPATIBILITY_VERSION should always match DYLIB_CURRENT_VERSION
CMake doesn't need any special handling
2022-09-05 08:48:16 -07:00
Sam Lantinga
4e98ba612b Set DYLIB_COMPATIBILITY_VERSION to DYLIB_CURRENT_VERSION to match autotools
Autotools sets both versions to the same value, so Xcode and CMake need to match for the libraries to be compatible between the different builds.

See these for details:
https://github.com/libsdl-org/sdl12-compat/pull/207
https://github.com/libsdl-org/SDL/issues/2934
https://stackoverflow.com/questions/67055770/usage-of-current-version-and-compatibility-version-on-macos
2022-09-05 08:28:06 -07:00
Francisco Javier Trujillo Mata
f1e4685806 Adding specific SDL_Hint for the dynamic VSYNC 2022-08-30 07:20:36 -04:00
Yevhen Babiichuk (DustDFG)
e6864d17b6 Update minimal required Android SDK version
Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
2022-08-24 11:39:32 -07:00
Ryan C. Gordon
3a9295e14f
build-scripts: Removed winrtbuild.*, no longer used.
WinRT/UWP is still supported, but you have to use the VS2019
project files, now.

Fixes #5639.
2022-08-09 16:17:28 -04:00
Anonymous Maarten
53141a56b4
Expand CMake documentation a bit (#5961)
* cmake: remove duplicate check_required_components macro

* Expand docs/README-cmake.md a bit

* cmake: path needs `/` infix
2022-08-09 13:05:03 -07:00
Ryan C. Gordon
8695d982d2
README-winrt.md: Updates for newer build details. 2022-08-09 10:09:54 -04:00
Francisco Javier Trujillo Mata
d355ea9981 Add a way to avoid IOP reset 2022-08-08 08:32:38 -07:00
Pierre Wendling
f790fc4fc0 Add contributing guidelines. 2022-08-07 16:34:52 -07:00
Cameron Cawley
3bdc10f842 Update the list of required Ubuntu packages, and add Ubuntu 22.04 workflows 2022-07-30 13:07:54 -07:00
Sam Lantinga
f789bc7d5f Updated minimum OS targets on Apple platforms to match supported platforms using Xcode 13 2022-07-26 11:36:01 -07:00
chalonverse
f317d619cc
Xbox GDKX support (#5869)
* Xbox GDK support (14 squashed commits)

* Added basic keyboard testing

* Update readme

* Code review fixes

* Fixed issue where controller add/removal wasn't working (since the device notification events don't work on Xbox, have to use the joystick thread to poll XInput)
2022-07-01 13:59:14 -07:00
chalonverse
7a02dcf3e6 Add note to GDK docs about XCurl.dll 2022-06-27 23:23:31 -04:00
chalonverse
3b191580c3
Windows GDK Support (#5830)
* Added GDK

* Simplfied checks in SDL_config_wingdk.h

* Added testgdk sample

* Added GDK readme

* Fixed error in merge of SDL_windows.h

* Additional GDK fixes

* OpenWatcom should not export _SDL_GDKGetTaskQueue

* Formatting fixes

* Moved initialization code into SDL_GDKRunApp
2022-06-27 10:19:39 -07:00
Sam Lantinga
5c1b7f6ea7 Added instructions for updating Makefile.w32 for release 2022-06-16 12:42:45 -07:00
Francisco Javier Trujillo Mata
161a316dfa Add PS2 readme 2022-06-15 15:15:26 -07:00
Anonymous Maarten
1087eaad7e cmake: install SDL2::SDL2test when configuring with SDL2_TEST enabled 2022-06-03 12:41:36 -07:00
Michael Fitzmayer
9b75fa0165
N-Gage port: add changes from code reviews, overall cleanup (#5618)
* Add changes from code review by @ccawley2011, #5597, overall cleanup

* Update N-Gage README, minor cleanup and rephrasing

* Call SDL_SetMainReady() before calling SDL_main, return SDL_main instead of main
2022-05-11 09:31:34 -07:00
Alex Szpakowski
d35c737f1c macOS: change min supported OS from 10.6 to 10.7. 2022-05-09 21:53:40 -07:00
Simon McVittie
2a8297e427 workflows: Add a test to assert that all the version numbers agree
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-04 09:55:35 -07:00
Simon McVittie
fff97c95eb build: Mechanically generate ABI versions from version number
If we're strict about applying something resembling semantic versioning
to the "marketing" version number, then we can mechanically generate
the ABI version from it.

This limits the range of valid micro versions (patchlevels) to 0-99.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-04 09:55:35 -07:00
Simon McVittie
60d702ac74 docs: Document new versioning scheme
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-04 09:55:35 -07:00
Simon McVittie
cd7c2f1de7 Switch versioning scheme to be the same as GLib and Flatpak
For stable releases, this gives us the ability to make bugfix-only point
releases such as 2.24.1 if we want to, and distinguish between them
programmatically. For example, this ability could have been useful after
2.0.16 to fix Xwayland regressions, and after 2.0.18 to fix event loop
regressions.

For development releases, this gives us the ability to make multiple
prereleases during the same feature cycle, and distinguish between them
programmatically. For example, this would have been useful during 2.0.22
development, which went through three prereleases before reaching the
final release.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-04 09:55:35 -07:00
Simon McVittie
22002d9155 docs/release_checklist.md: Document how/where to bump version numbers
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-04 09:55:35 -07:00
Michael Fitzmayer
fbd230bb6c
Add support for the Nokia N-Gage (#5597)
* Add initial support for the Nokia N-Gage

* N-Gage: disable clipping for the time being, issue needs to be resolved later

* Move va_copy definition to SDL_internal.h

* Move stdlib.h include to SDL_config_ngage.h, much cleaner this way

* Remove redundant include, add HAVE_STDLIB_H

* Revert "N-Gage: disable clipping for the time being, issue needs to be resolved later"

This reverts commit 4f5f0fc36c.

* N-Gage: fix clipping issue by providing proper math functions
2022-05-03 08:51:49 -07:00
Kelly Gravelyn
1aa9754d96 Add missing backslashes in README-linux.md command 2022-04-29 12:41:40 -04:00
Ryan C. Gordon
7d7ec9c951
x11: Remove XVidMode and Xinerama support.
Fixes #1782.
2022-04-26 23:17:13 -04:00
Ivan Epifanov
db718998bd Vita: fix readme 2022-03-31 06:02:50 -07:00
Jaylon Gowie
8e5adc62eb Update README-vita.md 2022-03-31 00:02:56 -04:00
Cameron Cawley
6529bf3de7 Clean up formatting in README-directfb.md 2022-03-27 09:12:25 -07:00
Cameron Cawley
0bc9e243b9 Remove URLs from markdown headers in README-visualc.md 2022-03-27 09:12:25 -07:00
Ryan C. Gordon
94ed6b0a54
README-windows: Notes on building with Visual Studio/LLVM.
Fixes #5186.
2022-03-26 08:55:26 -04:00
Ryan C. Gordon
5acb4b70ab
README-windows: Wordwrap text file.
This makes for easier reading outside of a formal Markdown viewer.
2022-03-26 08:50:25 -04:00
Ryan C. Gordon
26bfee8578
README-windows: Convert to actual Markdown text. 2022-03-26 08:47:46 -04:00
Sam Lantinga
67848b6531 Fix name of macOS platform and link to README file 2022-03-15 09:25:01 -07:00
Sylvain
0ad606b48d
Android: add comment to set render target to NULL when going to background (bug #4041) 2022-03-14 10:43:18 +01:00
Ivan Epifanov
8ce003a42c Vita: credit cpasjuste 2022-02-07 15:36:42 -08:00
Francisco Javier Trujillo Mata
ff5f5d0ef4 Updating Readme-psp info 2022-02-02 08:36:39 -05:00
Sam Lantinga
cbe97cbf7f Added a step necessary for running on a real device 2021-11-30 21:25:40 -08:00
Simon McVittie
0c7c4bfcf9 docs: Don't let Doxygen expand HOME environment variable
Otherwise, the API documentation will encode the home directory of the
user or autobuilder that built SDL, instead of telling the user to use
the literal string $(HOME) as intended.

See also <https://github.com/doxygen/doxygen/issues/7073>.

Signed-off-by: Simon McVittie <smcv@debian.org>
2021-12-01 02:37:40 +03:00
Sam Lantinga
056c09942d Updated iOS build instructions 2021-11-30 12:19:26 -08:00
めぐみ発動機 (isVowel / GreenWing)
34d9c2e28f fixed typo: ervironment to environment 2021-11-22 11:35:40 +03:00
Ryan C. Gordon
61881eb0a9 docs/README-macos.md: Updated Xcode instructions.
Fixes #960.
2021-11-20 13:14:00 -05:00
Ryan C. Gordon
193ab28fe4
Renamed README-macosx.md to README-macos.md 2021-11-14 23:35:50 -05:00
Ryan C. Gordon
4edf2df5ce
Unix2dos'd README-macosx.md. 2021-11-14 23:34:46 -05:00
Ryan C. Gordon
73a41f4058
Removed outdated build-scripts/iosbuild.sh
Fixes #1532.
2021-11-14 14:17:36 -05:00
Ozkan Sezer
2cf9374270 minor update to docs/README.md 2021-11-12 20:55:02 +03:00
Ozkan Sezer
4a1524350c updated linux dependencies for libXfixes-devel. 2021-11-12 15:55:50 +03:00
Ozkan Sezer
77a1ad1c61 minor update to os/2 readme. 2021-11-11 23:40:24 +03:00
Sam Lantinga
19c129faba Added documentation that the UIApplicationSupportsIndirectInputEvents key must be set to true
in your application's Info.plist in order to get real Bluetooth mouse events.
2021-11-09 20:32:16 -08:00
Ryan C. Gordon
cfdbd6acca
docs: Modernized README-macosx.md and cleaned up the Markdown a little.
Reference #960.
2021-11-09 10:51:02 -05:00
Cameron Cawley
c48c81bd17 docs: List the required Fedora packages in README-linux.md 2021-11-05 17:45:25 -07:00
Cameron Cawley
27369b3e40 docs: Add README-riscos.md 2021-10-30 21:25:01 -07:00
Ozkan Sezer
7f728f3eb6 enabled os2 joystick code (if anyone has actually a use for it...) 2021-10-15 08:51:02 +03:00
Sylvain
172957387e
PSP: links for setting up, compiling and running on PSP 2021-10-04 22:12:08 +02:00
Jaylon Gowie
88578dc9cb Update Docs 2021-09-10 19:49:47 -07:00
Jaylon Gowie
5fa8a042ac Fix the indentation 2021-09-10 19:49:47 -07:00
Ivan Epifanov
82c91fed21 Update docs 2021-09-09 07:22:01 -07:00
Ellie
21160cb815 Formatting fixes (purely cosmetic, fixes GitHub's rendering) 2021-09-07 07:29:40 -10:00
Ryan C. Gordon
57bfed79e2
README-dynapi.md: Google+ link is gone, remove it.
The Wayback Machine doesn't even have it.  :(
2021-08-03 22:15:04 -04:00
Ryan C. Gordon
178c95f82c
README-winrt.md: Cleaned up sample code
- Fixed the markdown.
- Code can now be exited by pressing ESC.
- Cleans up and returns from main()
- Mushed all the `if (x) { return 0; }` blocks into else ifs.
2021-08-03 21:52:47 -04:00
Ryan C. Gordon
9632fb3369
README-dynapi.md: Cleaned up markdown formatting. 2021-07-23 12:48:28 -04:00
Sam Lantinga
599001d4c7 Revert "Removed reference to ant project."
This reverts commit 0cad302346.

The ant directory still exists in source control
2021-07-07 13:30:48 -07:00
Gianfranco Berardi
0cad302346 Removed reference to ant project.
The android-project-ant directory does not exist anymore.
2021-06-14 12:58:48 -07:00
Ivan Epifanov
3c02814194 Update docs and fix typos 2021-06-11 13:21:07 -04:00
Sylvain
f5b87273e1
Fixed bug #4397 - update IOS documentation 2021-06-02 08:32:43 +02:00
Sylvain
30359a689f
Android: document workaround to use JNI on native thread (see bug #4406) 2021-06-01 20:11:59 +02:00
Cacodemon345
ddc6be3559 KMSDRM on Dragonfly BSD doesn't work without being root 2021-05-12 09:26:23 -07:00
Ryan C. Gordon
2542977b0a
Revert "Update wiki.libsdl.org urls to libsdl-org/SDL/wiki (#4069)"
This reverts commit 82a96afa70.

We ended up not moving to GitHub's wiki after all and built
https://github.com/icculus/ghwikipp to fill the gap...since the wiki is
back at https://wiki.libsdl.org/, put back the original URLs.
2021-04-01 12:15:28 -04:00
Cacodemon345
1899844952
Fix GitHub display of README-android.md 2021-03-21 01:15:14 +06:00
Ivan Epifanov
1e5cc96199 Docs 2021-03-08 09:07:12 -08:00
Cameron Cawley
2f4e9294aa Update the Linux build instructions 2021-02-25 19:24:50 +03:00
Ryan C. Gordon
c4b7e485af docs: README.md points to Discourse instead of the mailing list now. 2021-02-18 11:10:20 -05:00
Ryan C. Gordon
abe2c0f1b1 license: Fixed references to COPYING.txt that are now LICENSE.txt.
Fixes #4108
2021-02-18 11:07:26 -05:00
Cacodemon345
0a58010c0d Fix README-kmsbsd.md Markdown display 2021-02-17 13:11:00 -05:00
Cacodemon345
350e0ae1fd Add documentation for KMSDRM on *BSDs 2021-02-15 15:24:52 -05:00
erik yuzwa
92506462e2 update some copy 2021-02-15 08:35:13 -08:00
erik yuzwa
be17004e67 updated some notes around using a newer IDE 2021-02-15 08:35:13 -08:00
erik yuzwa
7f1b833373 initial work 2021-02-15 08:35:13 -08:00
Erik Yuzwa
82a96afa70
Update wiki.libsdl.org urls to libsdl-org/SDL/wiki (#4069) 2021-02-13 11:49:31 -05:00
Ryan C. Gordon
65fbf36c9e Cleaned up a few more Bugzilla mentions. 2021-02-12 14:46:49 -05:00
Ryan C. Gordon
4ff51d29c3 Deprecate SDL_GetRevisionNumber and update things for git instead of hg.
Fixes #4063
2021-02-12 14:31:38 -05:00
Ryan C. Gordon
f9046b4cab We're in Git now! Updated docs. 2021-02-11 14:39:08 -08:00
Sylvain Becker
d74779b748 Android: documention update 2021-02-10 10:22:19 -05:00
Ozkan Sezer
20db1471e5 added documentation docs/README-os2.md (based on original readme.os2). 2020-10-14 23:01:06 +03:00
Ryan C. Gordon
d31dac1563 docs: README-linux.md updated for a modern Ubuntu release. 2020-05-14 21:54:51 -04:00
Ryan C. Gordon
ec2d70364a docs: Fixed README-linux.md's line endings and word wrap. 2020-05-14 21:49:29 -04:00
Ryan C. Gordon
2d5de8faf9 docs: Linux systems don't need to install wayland-protocols anymore.
We ship the protocol xml files we need with SDL's sources now.
2020-05-14 21:48:24 -04:00
Ryan C. Gordon
b8590f1aec README-ios: added a note about enabling hidapi. 2018-10-29 15:51:38 -04:00
David Ludwig
3d55a51482 CMake: tabs to spaces in new parts of README-cmake.md 2019-09-23 18:30:22 -04:00
David Ludwig
00bc7f6b96 CMake: document iOS/tvOS support in README-cmake.md 2019-09-23 18:27:14 -04:00
Sylvain Becker
155087d106 Fixed bug 3918 - CMake support for android project 2019-08-11 15:23:37 +02:00
Ethan Lee
225ae6909e Add notes for SDL_WinRTRunApp and SDL2-WinRTResources for non-C++ projects 2019-06-09 11:54:51 -04:00
Sylvain Becker
05333a6e9f Android: add hint SDL_HINT_ANDROID_BLOCK_ON_PAUSE
to set whether the event loop will block itself when the app is paused.
2019-04-05 09:16:30 +02:00
Hugh McMaster
14b385f2bf docs: Replace references to configure.in with configure.ac 2019-03-27 20:58:33 +11:00
Sam Lantinga
390459d83e Updated minimum supported Android version to API 16, to match latest NDK toolchain 2019-01-12 12:11:06 -08:00
Sylvain Becker
d09774a47c Fixed bug 3511 - documentation to end an Android application 2018-12-30 14:23:25 +01:00
Ryan C. Gordon
bc57ac27f9 mir: Removed mir client support.
Fixes Bugzilla #4288.
2018-11-02 21:34:17 -04:00
Sam Lantinga
950f39e23b Backed out changeset 2944045e695b, SDL_JOYSTICK_HIDAPI is only used on iOS for Steam Controller support, which is not publicly available. 2018-10-29 19:58:59 -07:00
Ryan C. Gordon
b43f427fa6 README-ios: added a note about enabling hidapi. 2018-10-29 15:51:38 -04:00
Sam Lantinga
e381a1599d Updated Android project files and documentation 2018-10-28 10:31:06 -07:00
Sam Lantinga
38ae49880f Updated required Android SDK to API 26, to match Google's new App Store requirements 2018-08-21 20:46:25 -07:00
Ryan C. Gordon
b7e88aaae0 audio: Added ARM NEON versions of audio converters.
These are _much_ faster than the scalar equivalents on the Raspberry Pi that
I tested on. Often 3x to 4x as fast!
2018-05-16 02:03:06 -04:00
Sam Lantinga
6e01fbb763 On Android show the system UI when an SDL window is windowed, hide the system UI when it's fullscreen, like we do on iOS.
We're increasing the Android SDK minimum version to API 19, this doesn't increase the minimum target API, which is API 14.
2018-02-11 18:23:37 -08:00
Ryan C. Gordon
351d6d4784 audio: Port WASAPI to WinRT, remove XAudio2 backend.
XAudio2 doesn't have capture support, so WASAPI was to replace it; the holdout
was WinRT, which still needed it as its primary audio target until the WASAPI
code code be made to work.

The support matrix now looks like:

WinXP: directsound by default, winmm as a fallback for buggy drivers.
Vista+: WASAPI (directsound and winmm as fallbacks for debugging).
WinRT: WASAPI
2017-12-06 12:24:32 -05:00
Sam Lantinga
14452e9550 Fixed typos (thanks Martin!) 2017-12-04 20:21:52 -08:00
Sam Lantinga
fa5db3a931 Added the old ant Android build project structure 2017-10-28 12:11:25 -07:00
Sam Lantinga
edf0fae139 Updated Android build tools version, which bumped minimum deployment target to API 14
Also added native code to the Android gradle project, which allows using gradle or Android Studio to build the entire SDL application without a separate ndk-build step.
2017-10-23 23:23:47 -07:00
Sam Lantinga
f08480af78 Switched to new style gradle Android application build process 2017-10-23 15:23:43 -07:00
Sam Lantinga
bd5c984ac0 Fixed bug 3850 - incorrect numbering in docs/README-ios.md
Michal

the numbering of the bulletpoints in:
docs/README-ios.md

has been mangled with:
changeset 11365	efd3bc8e5a9b

fix:
    12 2.  Open SDL.xcodeproj (located in Xcode-iOS/SDL) in Xcode.
    13 4.  Select your desired target, and hit build.

remove:
    28 1. Follow step 1 above.

adapt:
    29 2. cd (PATH WHERE THE SDL CODE IS)/build-scripts
    30 3. ./iosbuild.sh
2017-09-26 16:27:24 -07:00
Sam Lantinga
12efabcbf0 Added instructions for deploying to older iOS devices (thanks Sylvain!) 2017-09-22 11:13:34 -07:00
David Ludwig
e365968a4c WinRT: minor formatting tweak in README-winrt 2017-09-19 10:33:08 -04:00
David Ludwig
f57ef6ff97 WinRT: noted UWP's inability to work with some game controllers 2017-09-19 10:31:22 -04:00
Sam Lantinga
5c8bde4f7b Updated documentation to note that libvulkan-dev is no longer needed 2017-09-09 07:45:31 -07:00
David Ludwig
2ea09903e6 WinRT: listed VS 2017 optional-component requirements 2017-09-03 16:36:22 -04:00
Sam Lantinga
6c38c9007b Update Android SDK required to API level 16
Sylvain

Some API 16 methods are used (InputDevice: getDescriptor(), getVibrator()), so we need to compile at least with SDK API 16. Hence default.properties and project.properties have been modified to use android-16.

There are also some modification to SDLActivity.java not to use getVibrator() if we run under API 16. And not to check to presence of hasVibrator() if we are under API 11.
-some hard-coded constant can be expandend.
- rename a local variable (hasVibrator to hasVibratorService)
2017-08-31 15:12:08 -07:00
Sam Lantinga
309474765b We don't need the VULKAN_SDK to build SDL with Vulkan support anymore 2017-08-28 19:30:59 -07:00
Sam Lantinga
ce2b16445e Be clear that disabling Vulkan surface support disables the entire SDL Vulkan integration 2017-08-28 00:11:38 -07:00
Ryan C. Gordon
25e3a1ec90 vulkan: Initial Vulkan support!
This work was done by Jacob Lifshay and Mark Callow; I'm just merging it
into revision control.
2017-08-27 22:15:57 -04:00
Sam Lantinga
148ac5b3cf Added Matt Styles' tutorial on building SDL for Android with Visual Studio 2017-08-19 00:27:11 -07:00
Ryan C. Gordon
76306827ec README-linux.md: added libsndio-dev to the package list. 2017-08-07 00:36:45 -04:00
Philipp Wiesemann
46b77b7322 raspberrypi: Fixed typos in README. 2017-06-24 23:45:34 +02:00
Philipp Wiesemann
a0aff76416 Added missing path in porting README. 2017-05-13 23:01:04 +02:00
Philipp Wiesemann
f1296a8652 Emscripten: Simplified option name in build script and README. 2017-04-02 21:33:24 +02:00
Ryan C. Gordon
2ce52bf9e1 README-hg.md: Updated main Mercurial website. 2017-04-01 00:17:15 -04:00
Philipp Wiesemann
7122036d03 Updated file name in porting README. 2017-03-19 22:16:24 +01:00
Charlie Birks
90e302d074 Remove link to emscripten tests
Not updated since early port. Also stopped working when Dropbox
stopped allowing HTML to be parsed.
2017-02-17 10:13:10 +00:00
Ryan C. Gordon
8ad131b78e readme: more HTTPS changes. 2017-02-16 13:55:12 -05:00
Philipp Wiesemann
330f2911c2 WinRT: Fixed typo in README. 2017-01-22 22:15:24 +01:00
Philipp Wiesemann
a812b4eb37 Changed Bugzilla link in README.md to HTTPS like in BUGS.txt. 2017-01-14 21:35:18 +01:00
Ryan C. Gordon
53588ff6b8 README-linux: added notes about libsamplerate. 2017-01-08 14:16:19 -05:00
Philipp Wiesemann
6f1f77b297 Fixed outdated info in README. 2016-10-30 21:01:33 +01:00
Sam Lantinga
54eb9067e1 Fixed bug 3460 - docs/README-macosx.md: g++fat.sh should be g++-fat.sh in universal build command
Elis?e Maurer

I scratched my head for a while until I realized there's a typo in the command listed in the instructions for universal Mac builds: https://hg.libsdl.org/SDL/file/3a3a88db1fc2/docs/README-macosx.md#l24

It should say `g++-fat.sh` but instead it says `g++fat.sh`, which makes `./configure` fail with a C++ preprocessor error.
2016-10-19 20:50:33 -07:00
Philipp Wiesemann
1fd2646c60 Android: Split long line in README. 2016-10-15 20:01:50 +02:00
Sam Lantinga
42f85aa29e Fixed building and using fcitx IME support on Linux 2016-10-08 11:30:07 -07:00
Sam Lantinga
d3cbc664d5 Fixed bug 2983 - Update Android.readme to include Tegra Graphics Debugger compatibility tip
Michael Labb?

NVidia has released some pretty nice Tegra profiling tools for their Android devices. The NVidia Tegra Graphics Debugger works by providing an interposer library that intercepts ES2 and EGL calls.  You must link against these libraries.

Unfortunately, this quietly fails with SDL2 because libEGL and libGLES2 are dynamically loaded with dlopen().

NVidia offers a secondary approach to using the Tegra Graphics Debugger: root your device and install a global interposer library.  Almost no devs will try this first if they don?t have a rooted device.

I propose an update to the Android readme that explains why the static linking approach recommended by NVidia doesn?t work.
2016-10-07 17:49:33 -07:00
Sam Lantinga
104c9541d9 Converted README documentation to DOS text format 2016-10-07 17:46:58 -07:00
Ryan C. Gordon
f33c58b004 Updated Linux notes on building with Mir and Wayland support. 2016-09-29 12:04:07 -04:00
Philipp Wiesemann
fc469f6f27 Mac: Fixed markdown formatting in README.
The newlines were lost in doxygen output.
2016-09-21 23:07:08 +02:00
Philipp Wiesemann
456901150c Fixed information in touch README and changed identifiers so doxygen links them. 2016-07-27 20:47:31 +02:00
Philipp Wiesemann
696867eed4 Mac: Updated file name in README. 2016-06-25 19:40:02 +02:00
David Ludwig
441359bd5a WinRT: workaround a possible Windows bug, whereby hiding cursors, disables mouse-moved events
This workaround, unfortunately, requires that apps directly link to a set of
Win32-style cursor resource files (that contain a transparent cursor image).
Copies of suitable resource files are in src/core/winrt/, and should be
included directly in an app's MSVC project.

A rough explanation of this workaround/hack, and why it's needed (and
seemingly can't be done through programmatic means), is in this change's code.
2016-05-14 23:29:49 -04:00
Philipp Wiesemann
fe4c3b29d9 iOS: Added brackets to function names in README so that doxygen links them. 2016-05-10 21:15:11 +02:00
David Ludwig
46851a6701 WinRT: another README tweak 2016-04-17 22:56:20 -04:00
David Ludwig
937ae32c7b WinRT: README tweaks 2016-04-17 22:54:45 -04:00
Philipp Wiesemann
ea86c01a86 Fixed markdown formatting in porting README for doxygen output.
The underscores and the newlines for the list were lost before.
2016-04-14 21:10:57 +02:00