Commit Graph

532 Commits

Author SHA1 Message Date
Sylvain ffd82fb7c4 Add scaleMode to SDL_SoftStretch(), remove SDL_SoftStretchLinear(). 2023-12-22 09:13:21 -08:00
Sylvain 5dba04b29b Remove SDL_{Set,Get}SurfaceScale().
Add Scale parameter to SDL_BlitSurfaceScaled() and SDL_BlitSurfaceScaledUnchecked()
(see #8732)
2023-12-22 02:08:49 -08:00
Sam Lantinga 4bb5e1f0f9 Added migration notes for migrating Steam Input support from SDL2 to SDL3 2023-12-20 14:15:09 -08:00
Ryan C. Gordon df0fd55891
wikiheaders.pl: README files are no longer in Windows endline format. 2023-11-30 10:10:04 -05:00
Ryan C. Gordon dd47da8a5c gamepad: Replace GetNumMappings/GetMappingByIndex with a single function.
Now it returns an array and optional count, to match other SDL3 APIs.
2023-11-29 20:50:44 -05:00
Ryan C. Gordon dfee3f9e92 render: Replaced SDL_RenderFlush with SDL_FlushRenderer.
This uses the same `SDL_VerbNoun` format as the rest of SDL3, and also
adds stronger effort to invalidate cached state in the backend, so cooperation
improves with apps that are using lowlevel rendering APIs directly.

Fixes #367.
2023-11-29 14:24:26 -05:00
Ryan C. Gordon 869257a5c1
SDL_migration.cocci: Added a thing for SDL_Vulkan_CreateSurface. 2023-11-06 19:16:38 -05:00
Sam Lantinga c2a3112b6f Added "--substring" to the help for rename_symbols.py 2023-10-23 09:14:54 -07:00
Ryan C. Gordon 9d7c57234a
audio: Cleaned out most remaining `/* */` comments for `//` style.
Fully committing to it...!

This left SDL_wave.* alone for now, since there's a ton of comments in there
and this code hasn't changed much from SDL2 so far. But as SDL2 ages out a
little more, I'll likely switch this over, too.
2023-10-18 15:39:01 -04:00
Sam Lantinga 4368f70ff9 Added properties to various SDL objects
The following objects now have properties that can be user modified:
* SDL_AudioStream
* SDL_Gamepad
* SDL_Joystick
* SDL_RWops
* SDL_Renderer
* SDL_Sensor
* SDL_Surface
* SDL_Texture
* SDL_Window
2023-10-11 22:38:00 -07:00
Ryan C. Gordon 8745a9949b
add-source-to-projects.pl: Fix adding files in the base src dir. 2023-10-09 19:19:01 -04:00
Ryan C. Gordon 399bc709b7
build-scripts.pl: Added add-source-to-projects.pl
This insert files to the Xcode and Visual Studio projects, so you can add
sources to the build without having to find a Mac or Windows machine with
the appropriate tools installed, and manually update four different sets of
projects across them.

This doesn't touch CMake, but you can add files to that with a text editor
(hopefully) without drama.

This, like all Perl code, is fragile. Report bugs and don't push it too hard.
2023-09-22 23:08:46 -04:00
Sam Lantinga 859dc14add Replaced SDL_GetGamepadBindForAxis() and SDL_GetGamepadBindForButton() with SDL_GetGamepadBindings() 2023-09-13 23:01:28 -07:00
Ryan C. Gordon ce27363df2
wikiheaders: Sort undocumented functions.
Otherwise they appear in random order, which isn't ideal in general, but
also this breaks the wiki/header bridge because it can't produce identical
conversions per-run.
2023-09-12 09:58:10 -04:00
Anonymous Maarten b00cbd76aa wikiheaders.pl: create Unsupported.md file with list of functions undocumented in either the headers or the wiki 2023-09-06 15:51:08 -04:00
Anonymous Maarten e85206ffd8 wikiheaders.pl: add --rev= option to pass revision string
This way, git is not required anymore to calculate the git revision
2023-09-04 18:56:00 +02:00
Sam Lantinga 233789b0d1 Audio types have the same naming convention as other SDL endian types, e.g. [S|U][BITS][LE|BE]
Native endian types have no LE/BE suffix
2023-09-04 09:48:44 -07:00
Brick 6a73f74b6b Rebuild full ResamplerFilter (left wing + right wing) at runtime 2023-08-25 08:43:56 -04:00
Brick fba6e1e3d3 Removed ResamplerFilterDifference
It takes 1 extra multiply to calculate the correct interpolation,
but I think the improvement in cache locality (and binary size) outweighs that.
2023-08-25 08:43:56 -04:00
Brick 47fea7f06b Used fixed-point arithmetic in ResampleAudio 2023-08-21 16:02:54 -04:00
Brick b9541b9eab Improved ResampleAudio
* filterindex2 was off-by-one
* Generate ResamplerFilter using doubles
* Transpose ResamplerFilter to improve access patterns
2023-08-21 16:02:54 -04:00
Simon McVittie efe15588d5 Relabel back paddles as left or right
The sequence order of the four paddles is not obvious, with SDL and Xbox
controllers swapping the order of P2 and P3 relative to each other.
If we group them into left and right, then it becomes more obvious.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-08-09 11:03:30 -07:00
Sam Lantinga b903ccf945 SDL_rwops read/write functions return size_t again
The current status is stored in the SDL_rwops 'status' field to be able to determine whether a 0 return value is caused by end of file, an error, or a non-blocking source not being ready.

The functions to read sized datatypes now return SDL_bool so you can detect read errors.

Fixes https://github.com/libsdl-org/SDL/issues/6729
2023-08-07 20:36:21 -07:00
Ryan C. Gordon e7d56dd0b2
audio: Renamed new API SDL_UnpauseAudioDevice to SDL_ResumeAudioDevice. 2023-08-05 19:20:14 -04:00
Ryan C. Gordon 6567285eae
SDL_migration.cocci: Fix up SDL_(Pause|Unpause)Audio. 2023-07-30 11:56:37 -04:00
luzpaz 65e1d568ef Fix various typos (docs/build scripts/tests) 2023-07-03 08:35:37 -07:00
Sam Lantinga f010411492 Rename SDL_strtokr() to SDL_strtok_r()
Fixes https://github.com/libsdl-org/SDL/issues/7914
2023-07-03 06:20:06 -07:00
Sam Lantinga e264bb5178 Rename SDL_PIXELFORMAT_RGB888 and SDL_PIXELFORMAT_BGR888 to SDL_PIXELFORMAT_XRGB8888 and SDL_PIXELFORMAT_XBGR8888 for clarity
Fixes https://github.com/libsdl-org/SDL/issues/7903
2023-07-01 17:58:34 -07:00
Sam Lantinga 8da9b22c17 The SDL_WINDOW_SKIP_TASKBAR flag has been replaced by the SDL_WINDOW_UTILITY flag
The SDL_WINDOW_UTILITY flag has the same functionality, and is now implemented on Windows.
2023-06-29 21:43:17 -07:00
Sam Lantinga c065a9b128 Fix some issues caught by check_stdlib_usage.py 2023-06-27 06:19:06 -07:00
Sylvain 70ccf34587 Script to detect use of stdlib function 2023-06-27 04:47:08 -07:00
Sam Lantinga 808d83dd67 Allow specifying APP_PLATFORM and APP_ABI on the command line 2023-06-21 13:49:09 -07:00
Sam Lantinga 8cf5dc9963 Build on Android targeting the arm64-v8a architecture by default
This speeds up iteration time and covers most customer devices
2023-06-20 09:18:19 -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
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 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 9b87de258f Fixed crash in new audio channel conversion code
Each loop needs to be run num_frames times, and the source and destination pointers are incremented by the number of channels during the conversion.
2023-05-04 15:50:38 -07:00
Brick 079ae065f1 Added SDL prefix AUDIO_* constants 2023-05-02 08:09:06 -07: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 eca7b8e4a1 Do not look at local headers when determining features
Avoids the detection of X11 on the build machine
2023-03-27 15:33:08 -07:00
Elad Lahav 4b17cc3a46 Add CMake toolchain files 2023-03-27 15:33:08 -07:00
Sam Lantinga 1f095b9ce6 Fixed wikiheaders.pl with perl-5.10.1 (thanks @sezero!) 2023-03-24 13:57:24 -07:00
Ryan C. Gordon 586004e52a
wikiheaders.pl: Manpages shouldn't use .BI sections, it looks bad.
Reference Issue #7514.
2023-03-21 22:23:06 -07:00
Ryan C. Gordon 1b81ececd3
wikiheaders.pl: Fixed uninitialized value warning when run without arguments. 2023-03-21 21:57:12 -07:00
Anonymous Maarten 77b8edb5ad wikiheaders.pl: add --manpath argument 2023-03-21 02:19:19 +01:00
Stephen Kitt bbfd5b3fb2 Specify bash for androidbuildlibs.sh
This script relies on string indexes in parameter expansions, which
aren't suppored by /bin/sh (e.g. dash).

Based on a patch by Roflcopter4:
https://github.com/joncampbell123/dosbox-x/pull/3850

Signed-off-by: Stephen Kitt <steve@sk2.org>
2023-03-10 07:26:37 -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
Sam Lantinga 941a603665 Document that SDL_IsScreenSaverEnabled() was renamed SDL_ScreenSaverEnabled() 2023-02-28 15:56:49 -08:00
Ryan C. Gordon 99c38268cd
wikiheaders: Sort pages before listing them in README/FrontPage.md. 2023-02-28 12:28:10 -05:00
Ryan C. Gordon 7745c9b3ae
wikiheaders: Use Windows endlines in the source, Unix in the wiki. 2023-02-28 12:28:10 -05:00
Ryan C. Gordon 6d1e14b792
wikiheaders: ignore wiki's README/FrontPage.md 2023-02-28 11:55:19 -05:00
Ryan C. Gordon 2506676f34
wikiheaders: Bridge README files in the docs directory to wiki.
Fixes #6026.
2023-02-28 11:45:47 -05:00
Ryan C. Gordon a479633455
wikiheaders: fixed wikilinks in Markdown code sections. 2023-02-27 23:08:19 -05:00
Ryan C. Gordon 5b0351a672
wikiheaders: Fix wikilinks inside code sections a little. Not perfect yet. 2023-02-24 14:29:36 -05:00
Ryan C. Gordon d748a454a8
wikiheaders: fixed see-also conversion 2023-02-24 11:45:43 -05:00
Ryan C. Gordon 5ff49955ab
wikibridge: Fixes for manpage generation from Markdown format. 2023-02-24 10:21:54 -05:00
Ryan C. Gordon 936a51d5cc
wikiheaders: Work to make the wiki exist primarily in Markdown format.
This adds a means to mass-convert the whole wiki to Markdown as a one-time
operation, and then some fixes to make --copy-to-headers correctly deal with
Markdown-formatted wiki pages.
2023-02-24 09:07:09 -05:00
Sam Lantinga 0fe1e9f3a7 Cleaned up SDL_migration.cocci, removing old SDL3 names 2023-02-22 16:44:06 -08:00
Sam Lantinga b39b7025fd SDL_GL_GetDrawableSize, SDL_Metal_GetDrawableSize, and SDL_Vulkan_GetDrawableSize can be replaced with SDL_GetWindowSizeInPixels 2023-02-13 13:11:43 -08:00
Sam Lantinga 13d9e41c3f SDL_WINDOWEVENT_SIZE_CHANGED was renamed SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED 2023-02-10 06:38:14 -08:00
Sam Lantinga 449b2289c8 Remove renaming for SDL_GetDisplayDPI() 2023-02-10 06:31:09 -08:00
Sylvain 7c4ec1867b Remove some vim config lines 2023-02-10 11:00:48 +01:00
Sam Lantinga fa599c7548 Fixed SDL_GetRendererOutputSize renaming 2023-02-09 17:31:44 -08:00
Sam Lantinga 9ff15e5382 Don't change M_PI in application code, that's not an SDL symbol 2023-02-09 17:26:15 -08:00
Sam Lantinga a357021800 Use GNU sed if available
Fixes update-copyright.sh on macOS, which doesn't support the -b option.
2023-02-06 15:47:16 -08:00
Sylvain 5d1006657a SDL_migration.cocci: remove metavariable warning 2023-02-05 17:48:18 +01:00
Sylvain 85143c28b5 SDL_migration.cocci: fix syntax 2023-02-05 09:37:37 +01: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 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
Anonymous Maarten 09e2f83e17 cmake: no more SDL3_* cache variables 2023-01-31 01:59:21 +01:00
Anonymous Maarten 9cf34908a1 cmake: pass VERSION to project() + don't use SDL_VERSION 2023-01-31 01:59:21 +01: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
Sylvain 413376cdb3 migration: replace SDL_DisplayMode w and h by screen_w and screen_h 2023-01-29 12:19:09 -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
Ryan C. Gordon 726d6f9422
wikiheaders: Allow markdown in the wikipreamble string.
Reference Issue #6568.
2023-01-26 14:45:57 -05:00
Anonymous Maarten 330ad80014 cocci: fix game pad event types 2023-01-25 22:02:31 +01:00
Ryan C. Gordon 01cba48d18
wikiheaders: Add a `\threadsafety` tag to document threading details.
Reference Issue #7140.
2023-01-25 12:59:25 -05: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 7b50bae524 Renamed SDL events for clarity
Fixes https://github.com/libsdl-org/SDL/issues/6877
2023-01-24 07:26:48 -08:00
Anonymous Maarten 0770c55e8d cocci: remove SDL_INIT_NOPARACHUTE 2023-01-22 20:14:35 +01:00
Anonymous Maarten 967ebd78e6 cocci: also fix up SDL_CreateRenderer calls with non-default render indices 2023-01-22 20:04:40 +01:00
Sylvain 1a47cf5448
Revert "gen_audio_resampler_filter: Use SDL_PI_F"
This reverts commit 41221777ba.
2023-01-16 10:04:22 +01:00
Sylvain 41221777ba gen_audio_resampler_filter: Use SDL_PI_F 2023-01-16 09:24:27 +01:00
Sylvain 9eaea7d661 SDL_migration.cocci: simplify multiplicaction / division by 1 2023-01-12 20:52:37 +01:00
Sylvain 3b2e9d98df SDL_migration.cocci: migrate audio api 1.2 2023-01-12 15:01:31 +01:00
Sylvain 8bdc25f4e4 SDL_migration.cocci: set events 2023-01-12 11:56:49 +01:00
Sylvain ed1bdf32ee SDL_migration.cocci: more gamepad migration 2023-01-12 11:39:48 +01:00
Sylvain 9b0c660a03 SDL_migration: various name changes, and function removed 2023-01-12 11:08:15 +01:00
Sylvain 21e4be5a27 SDL_migration: add RW read/write 2023-01-12 10:43:08 +01:00
Sylvain efa2945502 SDL_migration.cocci: add SIMD Alloc / Free 2023-01-12 09:58:37 +01:00
Sylvain 439c0b0236 Add vulkan migration 2023-01-12 09:45:14 +01:00
Sam Lantinga 0ad22cfe37 Fixed version validation 2023-01-11 15:11:41 -08:00
Sylvain 84cd7214bd SDL_migration.cocci / rename_api.py: handle migration of enum/structure
and fix previous one in SDL_migration.cocci.
2023-01-11 23:33:14 +01:00
Sam Lantinga 9f721d492a Catch SDL_opengles2.h in rename_headers.py 2023-01-10 15:25:48 -08:00
Sam Lantinga 69b94145d3 Updated documentation for SDL_migration.cocci
Especially note that this can be installed and run in WSL on Windows
2023-01-10 07:54:18 -08:00
Anonymous Maarten c4b471bd13 Ensure training new line in cocci files 2023-01-10 16:43:15 +01:00
Anonymous Maarten ecc48b882d migration: change 2nd arg of SDL_CreateRenderer to NULL if it was -1 2023-01-10 16:11:22 +01: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 fde78d12f2 Updated copyright for 2023 2023-01-09 09:41:41 -08:00
Sam Lantinga 78ccadd5a2 Speed up processing of update-copyright.sh 2023-01-09 09:38:36 -08:00
Sam Lantinga 228d9ae791 rename_headers.py covers begin_code.h/close_code.h 2023-01-04 23:50:08 -08:00
Sam Lantinga 566a559beb Fixed parsing symbols from SDL_oldnames.h 2023-01-04 13:51:00 -08:00
Sam Lantinga e76c1d74bc Added a python script to rename SDL2 headers to SDL3 headers 2023-01-04 11:20:38 -08:00
Sam Lantinga 406c8b79fe rename_symbols: only write new file if contents have changed
Also don't stop for other exceptions, just print them and keep going
2023-01-04 10:40:30 -08:00
Sam Lantinga ce412c2c71 Consistency cleanup for README-migration.md 2022-12-29 10:44:54 -08:00
Sam Lantinga 9b8208c195 Updated add_symbol_to_oldnames 2022-12-28 17:49:34 -08:00
Sam Lantinga 1d80082e8e Removed old iOS demos 2022-12-27 16:48:55 -08:00
Sam Lantinga 5baed331f1 Don't add symbol renaming to WhatsNew.txt 2022-12-27 10:00:10 -08:00
Sam Lantinga 84725c00d8 Make sure we update the cmake test programs as well 2022-12-27 09:56:16 -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 59467ff063 Make it easier to mass rename symbols in the SDL API 2022-12-27 07:31:27 -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
Sam Lantinga d31776b17a Also rename the internal function symbol when renaming API functions 2022-12-26 08:57:57 -08:00
Sam Lantinga 32fad06a93 Catch the iOS demos when renaming API functions 2022-12-23 20:32:12 -08:00
Sam Lantinga c309a92034 Added rename_symbols.py to mass rename symbols in an SDL2 codebase 2022-12-23 15:07:21 -08:00
Sam Lantinga 0967a32fc6 Added a --code-only option to rename.py
Also added support for renaming macros and structures
2022-12-23 13:15:19 -08:00
Sam Lantinga b5a92406eb Added infrastructure for renaming API functions
You can rename APIs using rename.py and all the code and documentation will be updated, and entries will be added to WhatsNew.txt and docs/README-migration.md.
e.g.
rename.py SDL_foo.h function SDL_CreateFoo SDL_FooCreate

SDL_oldnames.h is included in the SDL header, and if you define SDL_ENABLE_OLD_NAMES, will redefine the old API functions to call the new ones, and if not, will define them as a symbol letting you what the new API function is.
2022-12-23 11:00:11 -08:00
Anonymous Maarten 9e6952ed8c android: fix android-prefab.sh for SDL3 2022-12-21 09:39:22 -08:00
Daniel Gibson c3bf253b09 Remove SDL3_main from build systems, remove most of src/main/*
XCode is still missing, and src/main/winrt/SDL3-WinRTResource*
still need to find a new home
2022-12-15 08:01:01 -08:00
Daniel Gibson 7bfc41db3c Unify all the SDL_*RunApp() functions into just SDL_RunApp()
makes the SDL_main code shorter

Also added a generic SDL_RunApp() implementation for platforms that
don't really need it.

Some platforms (that use SDL_main but haven't been ported yet) are
still missing, but are added in the following commits.
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
Sam Lantinga 5750bcb174
Update for SDL3 coding style (#6717)
I updated .clang-format and ran clang-format 14 over the src and test directories to standardize the code base.

In general I let clang-format have it's way, and added markup to prevent formatting of code that would break or be completely unreadable if formatted.

The script I ran for the src directory is added as build-scripts/clang-format-src.sh

This fixes:
#6592
#6593
#6594
2022-11-30 12:51:59 -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 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 6d103303e7 Added toolchain files for cross-compiling to Windows 2022-11-25 15:37:30 -08:00
Ozkan Sezer 7b21eaddce remove autotools build system
- TODO: update INSTALL.txt to replace the autotools configure
        instructions with cmake.
- TODO: update make build system to provide an equivalent to
        autotools' `make dist` ?
- TODO: update / revise github actions, replace autotools-only
        ones with cmake (e.g.: vmactions.yml for FreeBSD.)

Reference issue: https://github.com/libsdl-org/SDL/issues/6571
2022-11-25 15:37:30 -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
Ryan C. Gordon 8b18b09027
fnsince.pl: Make this work with SDL3. 2022-11-22 17:39:56 -05:00
Ozkan Sezer dc2a3e06e9 removed WinRT support. 2022-11-22 23:36:24 +03:00
Sam Lantinga 0c1f9118a7 Removed version updates/checks for Makefile.os2 and Makefile.w32 2022-11-22 09:29:09 -08:00
Sam Lantinga e95819fae2 Update SDL info and Xcode marketing version with version update scripts 2022-11-22 09:27:25 -08:00
Ozkan Sezer e89a1f9157 removed NaCL support. 2022-11-22 20:10:47 +03:00
Sam Lantinga 2c4159b99a First pass at changing SDL 2.0 to SDL 3.0 2022-11-21 20:28:58 -08:00
Sam Lantinga 8ae46a49ea Save the version in VERSION.txt instead of VERSION
Fixes https://github.com/libsdl-org/SDL/issues/6558
2022-11-21 06:57:02 -08:00
Ryan C. Gordon 98dfc9296a
build-scripts/fnsince.pl: Deal with new point-release system.
This ignores 2.x.1 (etc) releases, which prevents it from thinking
the next official non-point-release version is 2.26.1, when it
should be 2.26.0, because it saw the "latest" release is 2.24.1.

This fixes the wiki ending up with imaginary version numbers for
the "this function is available since SDL 2.x.y" sections.

Fixes #6343.
2022-10-25 14:03:32 -04:00
Simon McVittie 4ca5ea5b7e build: Add a mechanism to mark builds with vendor info
Downstream distributors can use this to mark a version with their
preferred version information, like a Linux distribution package version
or the Steam revision it was built to be bundled into, or just to mark
it with the vendor it was built by or the environment it's intended to
be used in.

For instance, in Debian I'd use this by configuring with:

    --enable-vendor-info="${DEB_VENDOR} ${DEB_VERSION}"

to get a SDL_REVISION like:

    release-2.24.1-0-ga1d1946dc (Debian 2.24.1+dfsg-2)

which gives a Debian user enough information to track down the patches
and build-time configuration that were used for package revision 2.

In Autotools and CMake, this is a configure-time option like any other,
and will go into both SDL_REVISION (via SDL_revision.h) and
SDL_GetRevision().

In other build systems (MSVC, Xcode, etc.), defining the
SDL_VENDOR_INFO macro will get it into the output of SDL_GetRevision(),
although not SDL_REVISION.

Resolves: https://github.com/libsdl-org/SDL/issues/6418
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-10-22 09:27:10 -07:00
Simon McVittie 2dc788cb9f build: Expand version info in SDL_REVISION and SDL_GetRevision()
Instead of using a URL and git sha1, this uses `git describe` to
describe the version relative to the nearest previous git tag, which
gives a better indication of whether this is a release, a prerelease,
a slightly patched prerelease, or a long way after the last release
during active development.

This serves two purposes: it makes those APIs more informative, and it
also puts this information into the binary in a form that is easy to
screen-scrape using strings(1). For instance, if the bundled version of
SDL in a game has this, we can see at a glance what version it is.

It's also shorter than using the web address of the origin git
repository and the full git commit sha1.

Also write the computed version into a file ./VERSION in `make dist`
tarballs, so that when we build from a tarball on a system that doesn't
have git available, we still get the version details.

For the Perforce code path in showrev.sh, output the version number
followed by the Perforce revision, in a format reminiscent of
`git describe` (with p instead of g to indicate Perforce).

For the code path with no VCS available at all, put a suffix on the
version number to indicate that this is just a guess (we can't know
whether this SDL version is actually a git snapshot or has been
patched locally or similar).

Resolves: https://github.com/libsdl-org/SDL/issues/6418
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-10-22 09:27:10 -07:00
Sam Lantinga 5291e5cb76 Added version checking to SDLActivity.java
Make sure the SDL java and C code match when updating SDL in a game.
Right now we're assuming that we only have to make sure release versions match. We can extend the version string with an interface version if we need more fine grained sanity checking.

Fixes https://github.com/libsdl-org/SDL/issues/1540
2022-10-03 17:36:17 -07:00
Anonymous Maarten bac54b3d26 Android: add script for building prefab archive 2022-10-01 22:26:46 -07:00
Ryan C. Gordon f648c000bd
build: Fixed some references to renamed test-versioning.sh 2022-09-28 09:37:21 -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
Ryan C. Gordon 51be30f3cd
emscripten-buildbot.sh: force `-s USE_SDL=0`
This avoids using Emscripten-provided SDL headers from its own
sysroot instead of the headers in our own include directory!

Reference https://github.com/emscripten-core/emscripten/discussions/17647
2022-08-17 21:39:59 -04: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
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
Anonymous Maarten 2fdedd17be Revert 6fa7d62 and 856c99e5 2022-07-23 17:29:45 +02:00
Anonymous Maarten 856c99e583 android: target android-19 by default when building with build-scripts/androidbuildlibs.sh 2022-07-23 16:28:50 +02:00
Ryan C. Gordon bec721f08a audio: Fixed dst pointer on channel conversions that grow in-place. 2022-07-20 18:41:53 -04:00
Ryan C. Gordon 49ec8db5f8 audio: Generate the channel converter code from a program. 2022-07-20 18:41:53 -04:00
Ryan C. Gordon 118a2189fb
build-scripts/wikiheaders.pl: ignore the 'FrontPage' wiki pages. 2022-06-23 16:07:35 -04:00
Ryan C. Gordon 48a232969d
wikiheaders: Strip `[[wiki hyperlink]]` from See Also fields. 2022-06-19 00:15:41 -04:00
Ryan C. Gordon 83b766174c
build-scripts/wikiheaders.pl: ignore "Category" wiki pages. 2022-06-17 17:35:52 -04:00
Ryan C. Gordon 20c622f090
build-scripts/wikiheaders.pl: Allow a wiki preamble.
This is so we can have everything in SDL_net (etc) start with a
"This is not part of the core SDL API" message.
2022-06-17 14:40:35 -04:00
Sam Lantinga b004133f08 Updated to version 2.23.1 for pre-release checkpoint 2022-06-16 12:50:19 -07:00
Ryan C. Gordon 94f6080895
wikiheaders.pl: changes to make this usable with external projects. 2022-06-15 23:26:24 -04:00
Ozkan Sezer 6bd49fc00c revert mode changes from commit d58d637ac 2022-06-08 21:58:10 +03:00
Sam Lantinga d58d637ac6 Added support for the Qanba Obsidian Arcade Joystick on Linux 2022-06-08 11:07:36 -07:00
Ryan C. Gordon 5968f3d828
gen_audio_resampler_filter.c: Precalculate loop-invariant bessel(beta).
Minor optimization in offline code.
2022-05-26 10:44:01 -04:00
Ozkan Sezer 822cf0b34b updated config.guess from mainstream. 2022-05-26 01:33:32 +03:00
Ryan C. Gordon bed96482fa
wikiheaders.pl: Deal with links better. 2022-05-25 10:42:11 -04:00
Ryan C. Gordon 96a04cb910
wikiheaders.pl: Don't wordwrap truly massive words.
Usually, these are going to be URLs that you don't want to split
across lines.
2022-05-25 09:30:29 -04:00
Sam Lantinga aa6ea607d9 Fixed whitespace
Whitespace inconsistencies reported in https://github.com/libsdl-org/SDL/pull/5673
2022-05-18 06:58:14 -07:00
Ryan C. Gordon e78a72ec38
fnsince.pl: Fix next version value to match new versioning scheme. 2022-05-15 23:50:41 -04:00
Alex Szpakowski d35c737f1c macOS: change min supported OS from 10.6 to 10.7. 2022-05-09 21:53:40 -07:00
Ozkan Sezer 6422a5d259 updated config.guess and config.sub from mainstream 2022-05-10 07:33:32 +03: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
Ryan C. Gordon 5066910bf5 audio: Make pregenerated resampler kaiser filter more precise. 2022-04-26 13:32:42 -04:00
Ryan C. Gordon de019568dc audio: Prebake the resampler's kaiser table instead of doing it at runtime. 2022-04-26 13:32:42 -04:00
Sam Lantinga fa29e2d7f7 Updated to version 2.0.23 for development 2022-04-25 13:45:51 -07:00
Ozkan Sezer 55a4e1d336 CI: update os2.yml to use open-watcom/setup-watcom
also remove os2-buildbot.sh -- not needed anymore.
2022-04-14 10:10:02 +03:00
Sam Lantinga 505d6a4a05 Update version to 2.0.22 for release 2022-04-08 18:18:56 -07:00
Ozkan Sezer 1c1f5c180f imported two libtool mainstream commits 28fbcb6a and b55b1cc8 2022-03-16 17:15:20 +03:00
Sam Lantinga a0e3c884d4 Updated to version 2.0.21 for development 2022-01-17 15:32:27 -08:00
Ryan C. Gordon ae9e2149a5
os2-buildbot.sh: Use the 64-bit Watcom binaries.
GitHub Actions is a 64-bit Ubuntu instance. It was only using the 32-bit
binaries because our buildbot put this on the 32-bit Linux host to spread
the CPU load around more evenly.
2022-01-11 21:32:07 -05:00
Ozkan Sezer 63d10a0ac2 updates to config.guess and config.sub from mainstream. 2022-01-08 23:00:32 +03:00
Ozkan Sezer 836a4ec7b1 updates to os/2 build 2022-01-08 22:35:02 +03:00
Ryan C. Gordon f62b807174
wikiheaders.pl: Put the manpages in man/man3 2022-01-07 21:39:10 -05:00
Sam Lantinga 9294634840 Updated to version 2.0.20 for release 2022-01-07 18:29:40 -08:00
Ryan C. Gordon 5d3f6b0215
wikiheaders.pl: Added support for export to Unix manpages.
This mostly works, but likely needs some tweaking as we examine the output
of various pages.

Fixes #5163.
2022-01-06 15:37:05 -05:00
Ozkan Sezer 3355464079 libtool upgrade to 2.4.6 - 18/n: SDL customizations
removed os/2 versioning support.
2021-12-01 01:55:40 +03:00
Ozkan Sezer 5ae2f0fd19 libtool upgrade to 2.4.6 - 17/n: SDL customizations
fixes Windows linkage and the DLL name convention.
2021-12-01 01:55:32 +03:00
Ozkan Sezer 792d7c9f6d libtool upgrade to 2.4.6 - 15/n: -Xassembler and -Wa,* support :
http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=commitdiff;h=86d71e869d998fb09bee543a2aaef7beb6d6f591
http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=commitdiff;h=1b74d78401d7e09d5c31f4d479109d9b52984a32
2021-12-01 01:50:10 +03:00
Ozkan Sezer 8c44e0e0f8 libtool upgrade to 2.4.6 - 14/n: support for MidnightBSD
http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=commitdiff;h=5df7dd49d5e68ea45118a0687ef2d4dd00399f1e
2021-12-01 01:50:10 +03:00
Ozkan Sezer 27666089b9 libtool upgrade to 2.4.6 - 9/n: fix func_fatal_error function name typo
http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=commitdiff;h=350082b6aa89f9ef603fcebbb4cf33f15a743f2f
2021-12-01 01:50:10 +03:00
Ozkan Sezer df40268254 libtool upgrade to 2.4.6 - 3/n: fixes for gcc/clang linkage
http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=commitdiff;h=702a97fbb09bd7088a50f2b239016d1e32843c24
http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=commitdiff;h=a5c6466528c060cc4660ad0319c00740db0e42ba
http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=commitdiff;h=f9970d99293faf908fdc153a653fa5781095fb7a
2021-12-01 01:50:10 +03:00
Ozkan Sezer c8ddccdef4 libtool upgrade to 2.4.6 - 1/n 2021-12-01 01:50:02 +03:00
Sam Lantinga 5fc901d4f3 Updated to version 2.0.19 for development 2021-11-30 09:58:21 -08:00
Sam Lantinga 7242075b2b Updated version to 2.0.18 for release 2021-11-26 08:12:45 -08:00
Ryan C. Gordon 116a002b14
build-scripts/gcc-fat.sh is no longer supported. Use clang-fat instead.
Reference #4809.
2021-11-19 09:28:36 -05:00
Ryan C. Gordon 09bf12e035
fnsince.pl: SDL_UnregisterApp() also arrived in 2.0.2. 2021-11-18 15:34:29 -05:00
Ryan C. Gordon 83024f3299
fnsince.pl: Whoops, it's SDL_RegisterApp and not SDL_SetMainReady in 2.0.2. 2021-11-18 15:27:21 -05:00
Ryan C. Gordon 46f12cc7f7
fnsince.pl: SDL_SetMainReady() originally arrived in SDL 2.0.2. 2021-11-18 15:22:47 -05:00
Ryan C. Gordon 73a41f4058
Removed outdated build-scripts/iosbuild.sh
Fixes #1532.
2021-11-14 14:17:36 -05:00
Ryan C. Gordon a1c125c1f5
fnsince.pl: Report unreleased APIs as part of the next release version.
This keep documentation future-accurate and more importantly: it will
produce correct results before we tag the official release in git, so
they'll be correct in the tag and the release tarball.
2021-11-10 15:40:27 -05:00
Ryan C. Gordon 179a04f85a
fnsince.pl: Don't print out the version numbers if updating the wiki. 2021-10-26 21:01:05 -04:00
Ryan C. Gordon 85edbc92ac
fnsince.pl: Added a way to sync this information to the wiki.
This will let us automate this so it's managed for us, and as things go
from development to official releases, the documentation will automatically
update!
2021-10-26 19:00:06 -04:00
Ryan C. Gordon f5de45aecc
fnsince.pl: Found a few more incorrect versions. 2021-10-26 18:59:21 -04:00
Ryan C. Gordon e8fbcf893a
fnsince.pl: a script to list version when all public APIs were added. 2021-10-26 12:13:41 -04:00
Ryan C. Gordon d9d8f51eec
wikiheaders.pl: Add support for deprecated functions. 2021-10-23 14:41:23 -04:00
Ryan C. Gordon 55f60847cb
wikiheaders.pl: Try to handle functions with multiple declarations better. 2021-10-08 20:50:30 -04:00
Ryan C. Gordon 3970a885a5
wikiheaders.pl: Migrate in docs that exist only in the wiki.
This is going to expose some docs that needs cleaning up once
the bridge imports those docs, though.
2021-10-08 15:58:02 -04:00
Ryan C. Gordon 7850d0cf6f
cmake: Prefix all options with "SDL_"
This makes it clear which options came from SDL's CMake project when
building SDL as a subdirectory of a parent CMake project.

Fixes #4139.
2021-10-05 10:45:26 -04:00
Ryan C. Gordon 7def81cf42
wikiheaders.pl: Don't treat chars in `code` blocks as markdown.
Otherwise a formula like `x = y * 2;` would treat that '*' as the start of
an italicized section when converting to MediaWiki format, and match any
other '*' in the content as the end marker.
2021-09-30 17:34:25 -04:00
Ryan C. Gordon 8796f35e0f
wikiheaders.pl: Make sure all wiki API pages reference CategoryAPI. 2021-09-01 00:19:54 -04:00
Ryan C. Gordon a47f59bbe5
codechecker-buildbot.sh: Don't fail if a static analysis issue is reported. 2021-08-27 01:03:14 -04:00
Ryan C. Gordon a6b45fa7cf
codechecker-buildbot.sh: mark script as executable. 2021-08-27 00:56:18 -04:00
Ryan C. Gordon f7ee06f3a5
build-scripts: Add a buildbot script for CodeChecker static analysis. 2021-08-27 00:51:00 -04:00
Ozkan Sezer 7e8d054b97 updated config.sub from mainstream. 2021-08-21 11:50:04 +03:00
Sam Lantinga 3f6ebffff4 Updated to version 2.0.17 for development 2021-08-10 15:02:36 -07:00
Sam Lantinga cb1fd30e9a Updated to version 2.0.16 for release 2021-07-31 13:28:54 -07:00
Ryan C. Gordon c07e5e99c8
wikiheaders.pl: Add --copy-to-header option.
...because I keep mistyping it without the 's' on the end.  :/
2021-07-14 17:07:41 -04:00
Ryan C. Gordon 8ec9fbdd0c
wikiheaders.pl: pull in full sections from headers, fix more whitespace. 2021-07-14 11:58:57 -04:00
Ryan C. Gordon bab0eb71ce
wikiheaders.pl: Fix some wordwrap whitespace issues. 2021-07-14 11:03:00 -04:00
Ryan C. Gordon 7390bc0e5e
wikiheaders.pl: Fix \sa tags that (incorrectly!) have "()" appended. 2021-07-14 11:03:00 -04:00
Ryan C. Gordon d115857c6f
wikiheaders.pl: A bunch of work on correct wordwrap and (de)wikify. 2021-07-14 11:02:59 -04:00
Ryan C. Gordon 1f17bc549e
wikiheaders: look for "c++" before "c" in regular expression. 2021-07-14 11:02:59 -04:00
Ryan C. Gordon 269d0773c7
wikiheaders: Ignore doxygen comments that aren't "/**" on a line by itself.
Makes this ignore /** single line comments */
2021-07-14 11:02:58 -04:00
Ryan C. Gordon 8130950e92
wikiheaders: trim whitespace at edges after wordwrapping. 2021-07-14 11:02:58 -04:00
Ozkan Sezer 118480e563 fix permissions 2021-07-08 17:56:14 +03:00
Sam Lantinga 46f19c311d Implemented mouse relative mode for iOS 14.1 and newer 2021-07-08 07:23:29 -07:00
Ozkan Sezer 6b21a6ccc6 Update config.guess and config.sub from mainstream. 2021-07-05 20:02:02 +03:00
Ryan C. Gordon 56e96254c2
build-scripts: modernized gcc-fat.sh for Big Sur and ARM64.
Put these in "clang-fat.sh" and "clang++-fat.sh" in case someone still needs
32-bit x86 support from the old scripts.

Fixes #4350.
2021-06-09 14:01:40 -04:00
Ozkan Sezer 7a7cba4b73 config.guess, config.sub: fix permissions 2021-05-25 14:56:37 +03:00
Sam Lantinga 157c3f8097 [SDL] Minimize number of system calls when handling WM_INPUT raw input messages.
Details:
Currently doing 4 system calls per WM_INPUT message, which can cause the thread handling the message loop to be swapped out several times:
* GetProp - to get window data from the window handle
* GetRawInputData - to retrieve the raw input data
* 2 calls to GetMessageExtraInfo - to ignore synthetic mouse events generated for touchscreens

In this change:
* Replaced GetProp by iterating the list of windows maintained by SDL (with a fallback to GetProp). Note that this will affect all messages and not just WM_INPUT
* only calling GetMessageExtraInfo if a touchscreen has been detected

Fix for https://jira.valve.org/browse/CSGO-4855
@saml
2021-05-21 09:45:08 -07:00
Ozkan Sezer c63a62ae49 updates to config.guess and config.sub from mainstream. 2021-05-18 23:51:50 +03:00
Ryan C. Gordon ab7944f960
wikiheaders: fixed regex for converting markdown bold+italic to mediawiki. 2021-03-25 12:52:15 -04:00
Ryan C. Gordon f55445422a
wikiheaders: when merging into headers, wordwrap in Markdown style. 2021-03-25 12:50:18 -04:00
Ryan C. Gordon 45d128db00
wikiheaders: Fixed double-wikify call. 2021-03-24 22:36:06 -04:00
Ryan C. Gordon 5753fd73c3
wikiheaders.pl: Whitespace fixes. 2021-03-24 12:52:48 -04:00
Ryan C. Gordon c2152928fa
wikiheaders.pl: Mark some sections as wiki-only so we don't lose them. 2021-03-24 10:48:45 -04:00
Ryan C. Gordon 231b849c9e
wikiheaders.pl: Properly handle and wordwrap bullet lists. 2021-03-24 10:48:44 -04:00
Ryan C. Gordon db2ad6fa73
git-pre-push-hook: remove ".git" from URL. 2021-03-17 13:36:38 -04:00
Ryan C. Gordon 7a2a1a85e9
documentation: initial script to merge header comments and the wiki.
This is a work-in-progress, but the idea is it can convert between our
wiki and the SDL header's doxygen comments, so we can attempt to keep them
in sync.

This might be a fool's errand, but I'm optimistic it'll work enough that we
can clean up little issues as we go, as long as we have some discipline
about how we write documentation. If nothing else, it's going to result in
a solid spring-cleaning of both the wiki and the headers!
2021-03-16 13:49:35 -04:00
Ozkan Sezer bb76edf3d7 fix permissions of a few files 2021-02-22 15:44:32 +03:00
Ryan C. Gordon a6388cf2ca
Add the usual "vi" comment to the end of pre-push-hook. 2021-02-13 23:02:26 -05:00
Ryan C. Gordon 0e9fd0f8bb Added a script that can be used to show commit URLs during a `git push`.
Just symlink/copy it to .git/hooks/pre-push and make sure it's executable!
2021-02-12 17:12:56 -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
Sam Lantinga 9deffcd325 Updated the revision header with git revision 2021-02-12 08:50:16 -08:00