Log

Author Commit Date CI Message
Cameron Cawley f5cf0e37 2022-05-19T14:51:25 Remove unused and duplicate defines from SDL_dynapi_overrides.h
Ozkan Sezer 03ebc439 2022-05-19T14:01:10 dynapi: add missing SDLCALL for SDL_TLSSet's dtor param.
Pierre Wendling 501a4991 2022-05-05T18:44:32 Add clang-format on/off comments where necessary. Comments were added in places where INDENT-ON/OFF comments are. Places like stdlib's asm don't need it as clang-format doesn't try to indent it.
Pierre Wendling c6a77971 2022-05-05T03:27:47 Add a clang-format config file. tmp
Pierre Wendling 973424d9 2022-05-06T12:08:44 Add for-each macros to clang-format.
Sam Lantinga 0e6d4baa 2022-05-19T01:23:24 Fixed compile warning on gcc 11
Sam Lantinga c7dff3a2 2022-05-19T00:35:22 Attempt to get the X1 and X2 button state on X11 by using the current event state instead of direct X11 query.
Sam Lantinga 57130b75 2022-05-19T00:31:20 Revert "x11: get x1/x2 button state in GetGlobalMouseState" This reverts commit 3fcc2cb500a752698687ad0c8bb14778e6cb84c3. Button4 and Button5 are for the scrollwheel, not the extended buttons. I don't know of a way to query the state of the extended buttons using X11.
Sam Lantinga 47f1cb55 2022-05-18T23:48:15 Fixed picking up the correct mapping for virtual controllers on Android Fixes https://github.com/libsdl-org/SDL/issues/5662
Sam Lantinga f7b774a7 2022-05-18T17:59:17 Fixed build error on Linux if HAVE_INOTIFY isn't defined Fixes https://github.com/libsdl-org/SDL/issues/5682
Sam Lantinga f9a9d3c8 2022-05-18T17:23:49 Also restore previous capture window if CaptureMouse() fails
Sam Lantinga 7044452d 2022-05-18T17:15:10 Handle recursion in SDL_UpdateMouseCapture() Fixes https://github.com/libsdl-org/SDL/pull/5608
Ozkan Sezer dbd54dd7 2022-05-19T03:00:04 adjust dynapi after commit 0cca71a changes for SDL_qsort and SDL_bsearch
Sam Lantinga e19a9a79 2022-05-18T15:29:59 Fixed a message box getting the mouse capture state out of sync
Cameron Cawley 622311c0 2022-05-18T22:51:58 Add extra XInput structures and defines for older SDKs
Cameron Cawley c8eea020 2022-05-18T21:14:20 Fix C89 build errors in Windows builds
Cameron Cawley 0cca71a8 2022-05-18T22:12:05 Use SDLCALL for callbacks in public APIs
Cameron Cawley ffab9f46 2022-05-18T21:07:33 Avoid clashing with system headers when redefining standard library functions
Simon McVittie 4cb57bf1 2022-05-18T13:42:48 .editorconfig: Automatically configure multiple text editors See editorconfig.org for details of the format, which is understood by multiple text editors, either directly or via plugins. This is not comprehensive, but should cover most of the SDL codebase. Please extend as needed. Signed-off-by: Simon McVittie <smcv@collabora.com>
Sam Lantinga 06aca7ed 2022-05-18T10:09:24 Fixed warping back into the window when gaining focus with warp relative mode enabled
Sam Lantinga 0ffd9859 2022-05-18T09:59:12 Check to see if the file exists in the base path before returning it
pionere c4cf63f8 2022-05-18T18:04:12 improve test-configuration - testkeys 'NEEDS_DISPLAY' - 'disable' relevant tests in case DUMMY audio/video is disabled
Sam Lantinga b44241ab 2022-05-18T08:50:59 Don't send mouse events when warping in relative mode This fixes games which set relative mode and then did mouse warping at the same time Reference https://github.com/libsdl-org/SDL/issues/5609
pionere ea152532 2022-05-18T17:23:26 fix GetNearbyFilename - fix memory leak due to variable 'base' - fix usage of uninitialized variable (path)
Ivan Epifanov 8c5bda6a 2022-05-18T17:58:35 Vita: remove Vita-specific RWOps code
Sam Lantinga aa6ea607 2022-05-18T06:57:28 Fixed whitespace Whitespace inconsistencies reported in https://github.com/libsdl-org/SDL/pull/5673
Ryan C. Gordon 56665e1d 2022-05-17T12:50:13 cocoa: Try to use better system cursors. These try to pull from the .pdf files that are installed with macOS, which fit our needs better, and fall back to the most reasonable defaults available from NSCursor if we can't load them. Since these are installed under /System, they should be sandbox accessible, and if this totally fails, it should still go on, albeit with a less good cursor. Reference Issue #2123.
Ryan C. Gordon a12ffbd5 2022-05-17T12:49:36 testcustomcursor: Log the current cursor type as it changes. So you know what you're looking at.
Alex Szpakowski e9c7b519 2022-05-16T21:03:41 macOS: Fix reference counts of internal window data. Fixes crashes when destroying or recreating a window (#5664).
Ozkan Sezer a4800495 2022-05-17T01:33:20 disable dynapi for os/2, at least for now. (see bugs #5667 and #5669.)
Ozkan Sezer ec1a0f62 2022-05-17T01:33:02 SDL_malloc.c: workaround calling convention issues for real_xxx procs.
Sam Lantinga 1f2a2416 2022-05-16T09:02:35 Add new virtual joysticks to the end of the list This guarantees that the device index that's returned is stable, as long as no joystick hotplug events occur.
Sam Lantinga 3c3ccb1d 2022-05-16T08:55:54 Fixed crash if a virtual joystick was disconnected
Ryan C. Gordon 2317a96c 2022-05-16T10:50:13 x11: Use XC_top_left_corner/XC_top_right_corner instead of XC_fleur. On Gnome (and hopefully others!), this produces something that actually matches SDL_SYSTEM_CURSOR_SIZENWSE/SDL_SYSTEM_CURSOR_SIZENESW. On other desktop enviroments, it probably fits the spirit better than XC_fleur in any case. Reference Issue #2123.
Sam Lantinga 48b6cd8b 2022-05-16T07:23:30 Fixed whitespace
Sam Lantinga f0bc5c9c 2022-05-16T07:21:28 Added effects support for virtual controllers
Sam Lantinga b3a18706 2022-05-16T06:37:38 Removed unused variables
Sam Lantinga 7e005bd8 2022-05-16T06:22:18 Fixed mapping the paddle buttons with the virtual controller
Sam Lantinga e3fd8fea 2022-05-16T06:16:32 Fixed getting the controller index when specifying --virtual (thanks @zturtleman)
SDL Wiki Bot 5953422c 2022-05-16T03:52:04 Sync wiki -> header
Ryan C. Gordon e78a72ec 2022-05-15T23:50:08 fnsince.pl: Fix next version value to match new versioning scheme.
Sam Lantinga bfac54b5 2022-05-15T20:33:28 Added the ability to specify which buttons and axes are present for virtual controllers
SDL Wiki Bot 49ca8bf5 2022-05-16T03:03:04 Sync wiki -> header
Sam Lantinga 94eeb587 2022-05-15T20:01:12 First pass at extending virtual controller functionality Added the ability to specify a name and the product VID/PID for a virtual controller Also added a test case to testgamecontroller, if you pass --virtual as a parameter
Sam Lantinga 7ad15c5b 2022-05-15T09:35:52 Added game controller support for virtual joysticks Fixes https://github.com/libsdl-org/SDL/issues/5662
Sam Lantinga 996b3dc3 2022-05-15T09:33:28 Fixed warning building with Visual Studio
Cameron Cawley e0f3da49 2022-05-12T12:18:23 Remove unused SDL_ASSEMBLY_ROUTINES define
SDL Wiki Bot f93e8107 2022-05-12T07:39:04 Sync wiki -> header
Sylvain 6b9884d4 2022-05-12T09:36:49 Fixed bug #4213 - update documentation to reflect SDL2 behavior of SDL_RenderGetLogicalSize
Ethan Lee e4bb3c86 2022-05-11T18:13:44 wayland: Fix build for configs without libdecor
Ethan Lee 6222bd31 2022-05-11T16:26:43 wayland: Don't create a new libdecor context if one already exists
Ethan Lee 6f88cbe4 2022-05-11T16:04:34 wayland: Support xdg_decoration requesting client-side decorations. Don't be fooled by the diff size - this ended up being a big refactor of the shell surface management, masked only by some helper macros I wrote for the popup support. This change makes it so when xdg_decoration is supported, but CSD is requested, the system bails on xdg support entirely and resets all the windows to use libdecor instead. This transition isn't pretty, but once it's done it will be smooth if decorations are an OS toggle since libdecor will take things from there. In hindsight, we really should have designed libdecor to be passed a toplevel, having it manage that for us keeps causing major refactors for _every_ change.
Eddy Jansson d7866ffa 2022-05-11T19:39:30 assert: Check for integer overflow. Move rendering of the assert message into a separate function so we can remove the ugly loop construction. Changes the logic such that allocation failure no longer immediately returns SDL_ASSERTION_ABORT, instead we fall back to the truncated message. If an error is indicated from SDL_snprintf, then we do abort with SDL_ASSERTION_ABORT.
Sam Lantinga 737b4fc3 2022-05-11T11:17:58 Added -fobjc-arc to support automatic reference counting on macOS
Michael Fitzmayer 9b75fa01 2022-05-11T18:31:34 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
Sam Lantinga 2c2cbbe6 2022-05-11T09:04:23 Fixed function reference for SDL_SIMDGetAlignment()
Sam Lantinga 6da99d4a 2022-05-11T08:40:17 Don't use SDL_SIMDFree() if the pixels haven't been allocated with SDL_SIMDAlloc()
Cameron Cawley 2f924020 2022-05-05T20:12:07 Add SDL_SCANCODE_CALL and SDL_SCANCODE_ENDCALL
Cameron Cawley 2bc37362 2022-05-05T13:31:26 Add SDL_SCANCODE_SOFTLEFT and SDL_SCANCODE_SOFTRIGHT
Alex Szpakowski f871c178 2022-05-10T17:32:24 macOS: remove dead code for supporting 10.6 at runtime.
Simon McVittie 8ab3ae98 2022-05-10T09:44:23 stdinc: Add a comment to clarify why inline functions are needed here Signed-off-by: Simon McVittie <smcv@collabora.com>
Eddy Jansson f7280dce 2022-05-10T14:52:14 log: Check for integer overflow.
Alex Szpakowski d35c737f 2022-05-07T21:38:48 macOS: change min supported OS from 10.6 to 10.7.
Alex Szpakowski ec8fa577 2022-05-07T21:57:23 macOS: always use Objective-C ARC (automatic ref counting). Change Cocoa SDL_VideoData and SDL_WindowData implementations from C structs to Objective-C objects, since bridging between C and ObjC is easier that way.
Ozkan Sezer 6422a5d2 2022-05-10T07:33:32 updated config.guess and config.sub from mainstream
Simon McVittie 2a794801 2022-05-09T14:58:51 cpuinfo: Check for overflow in SIMD allocation If the size to be allocated is very large and untrusted, then adding the padding etc. might be enough to cause unsigned overflow, after which a very small amount of memory will be allocated. Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie cf1daafa 2022-05-09T18:48:46 cpuinfo: Set padding to 0 if none is needed It'll be simpler to use overflow detection after this refactor. Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie d15f6e37 2022-05-09T18:19:21 test: Add a unit test for overflow detection Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie f661654f 2022-05-09T14:36:27 stdinc: Add overflow-checking add and multiply for size_t This can be used to check whether untrusted sizes would cause overflow when used to calculate how much memory is needed. Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie 6e6e425e 2022-05-05T17:50:28 workflows: Do the equivalent of Automake `make distcheck` The official source code release isn't much use unless it contains everything that users and downstream distributions need to do a new build, so check that it does. Signed-off-by: Simon McVittie <smcv@collabora.com>
Cameron Cawley c71ee68b 2022-05-08T17:17:49 Fix enabling tests on platforms without testnative support
Cameron Cawley 318b5577 2022-05-08T20:59:10 Delete gcc-fat.sh
Cameron Cawley 9ef68857 2022-05-08T15:53:43 Fix MSVC ARM32 builds
Frank Richter b352b783 2022-05-07T14:57:17 Add 'static VCRT' cases to MSVC build matrix
Frank Richter 0e63b514 2022-05-07T14:52:35 Don't define memcpy(), memset() when using static VC runtime. The linker will complain about duplicated symbols otherwise (see #3662, #5156).
Sam Lantinga 8cd908e0 2022-05-06T10:51:55 Fixed building with Visual Studio 2013 Added SDL_vacopy.h since it needs to be included after Windows headers
Sam Lantinga a3c1ca1f 2022-05-06T09:07:36 Added support for the Backbone One guide button The guide button is activated on a long press (> 400ms)
Ozkan Sezer 95f9c3cf 2022-05-06T18:56:24 Makefile.os2: add SDL_BUILD_???_VERSION defines to correct CFLAGS.
Sam Lantinga 0c196021 2022-05-06T07:59:36 Applied 0004-Define-crt-macros.patch.txt from vcpkg ports
Sam Lantinga fa505970 2022-05-05T11:54:00 Simplified autogen.sh, thanks to @smcv for the tip
Ozkan Sezer db36664f 2022-05-05T18:55:02 configure.ac: remove unnecessary AC_SUBST's added by commit 38ef6789909c
Sam Lantinga f0c870b9 2022-05-05T08:19:10 Rebuilt configure from configure.ac changes
Simon McVittie b03e08f3 2022-05-05T16:06:11 configure.ac: Use Autoconf quadrigraphs for character set in AS_CASE The use of square brackets for a character set collides with the use of square brackets for m4 quote characters, so use the other quoting mechanism that Autoconf provides, by escaping `[` as `@<:@` and so on. Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie c244bbc5 2022-05-04T17:50:44 workflows: Install and run GNOME-style installed-tests This is currently only done for the Linux Autotools build. The CMake build does not add a significant amount of extra test coverage, and Github Workflows run in an environment where `cmake` and `sudo cmake` point to different executables, which makes it awkward to install into /usr/local from CMake. Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie ce502054 2022-05-04T13:53:15 test: Install GNOME-style installed-tests metadata This allows these tests to be discovered and run by gnome-desktop-test-runner. Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie 38ef6789 2020-11-25T13:30:29 test: Add a `make install` target for the tests This makes it more convenient to compile them alongside SDL, install them in an optional package and use them as smoke-tests or diagnostic tools. The default installation directory is taken from GNOME's installed-tests, which seems as good a convention as any other: https://wiki.gnome.org/Initiatives/GnomeGoals/InstalledTests Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie 76a7b629 2022-04-12T13:07:18 test: Add some common code to load test resources As well as reducing duplication, this lets the tests load their resources from the SDL_GetBasePath() on platforms that support it, which is useful if the tests are compiled along with the rest of SDL and installed below /usr as manual tests, similar to GNOME's installed-tests convention. Thanks to Ozkan Sezer for the OS/2 build glue. Co-authored-by: Ozkan Sezer <sezeroz@gmail.com> Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie ecf1e15f 2022-05-04T19:31:11 workflows: Parallelize Linux Autotools and CMake builds Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie dba79ade 2022-05-04T13:57:30 workflows: Run build-time tests Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie 40bef98f 2022-05-04T19:16:01 test: Add a mode to skip tests that involve arbitrary delays This can be used as a quick acceptance test for CI workflows. Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie 7d2808e3 2022-04-12T13:33:58 test: Run selected noninteractive tests at build-time In Autotools, these are run by `make -C ${builddir}/test check`. In CMake, they're run by `make -C ${builddir} test` or `ninja -C ${builddir} test` or `ctest --test-dir ${builddir}`. Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie b299f74d 2022-05-04T15:34:41 test: Make testevdev succeed if the feature is disabled "Not applicable" is more like success than it is like failure. Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie 6fc7aa28 2022-05-04T13:15:12 cmake: Add some missing test-cases These were built by Autotools but not by CMake. Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie a4594797 2022-05-04T18:13:25 workflows: Only run `cmake --install` on Unix platforms The syntax used in this step assumes a Unix shell. Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie 79a16da6 2022-05-04T18:14:22 workflows: Change how we make CMake verbose Some CI workers don't seem to understand `cmake -v`, and Windows' shell doesn't understand `VERBOSE=1 cmake`. Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie 4da47601 2022-05-04T18:13:38 workflows: Remove redundant `cmake --build` Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie 2a8297e4 2022-05-04T16:43:59 workflows: Add a test to assert that all the version numbers agree Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie fff97c95 2022-05-04T16:40:11 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>
Simon McVittie 60d702ac 2022-05-04T16:39:05 docs: Document new versioning scheme Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie cd7c2f1d 2022-05-03T15:16:11 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>