src/main

Branch


Log

Author Commit Date CI Message
Sam Lantinga 15ead9a4 2023-11-02T10:00:33 Updated to version 2.28.5 for release
Sam Lantinga cc016b00 2023-10-01T12:05:05 Updated to version 2.28.4 for release
Sam Lantinga 8a5ba43d 2023-09-01T11:22:07 Updated to version 2.28.3 for release
Sam Lantinga 031912c4 2023-08-02T08:31:19 Updated to version 2.28.2 for release
Christopher Wellons 078e817c 2023-07-09T20:05:32 Unaligned stacks on i686-w64-mingw32, may lead to crashes (#7607) Co-authored-by: Ozkan Sezer <sezeroz@gmail.com>(cherry picked from commit 8231278817faabdff4a232770f798684bd2e12df)
Sam Lantinga 4761467b 2023-07-01T09:56:20 Updated to version 2.28.1 for release
Sam Lantinga ffa78e6b 2023-06-20T11:00:20 Updated to version 2.28.0 for release
Sam Lantinga d4f9be44 2023-06-13T19:44:26 Updated to version 2.27.1 for release candidate
Sam Lantinga 3f1fd5ab 2023-05-23T10:59:03 Updated source to match SDL function prototype style
Jerome Duval eb0d214c 2023-03-29T21:28:21 Haiku: use a BLooper for events. only create a BApplication when it doesn't already exist.
Ryan C. Gordon 7ac43cfb 2023-01-29T11:43:59 Note that version.rc is public domain. This avoids potential concerns that customizing would qualify a build of SDL as an "altered source version" under the zlib license.
Francisco Javier Trujillo Mata 381312a0 2023-01-13T16:37:54 Use filesystem drivers
Sam Lantinga 0479df53 2023-01-09T09:48:21 Updated copyright for 2023
Pierre Wendling d0bbfdbf 2022-12-01T16:07:03 Clang-Tidy fixes (#6725) (cherry picked from commit 3c501b963dd8f0605a6ce7978882df39ba76f9cd)
Sam Lantinga b8d85c69 2022-11-30T12:51:59 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 (cherry picked from commit 5750bcb174300011b91d1de20edb288fcca70f8c)
Sylvain Becker fb0ce375 2022-11-27T17:38:43 Cleanup add brace (#6545) * Add braces after if conditions * More add braces after if conditions * Add braces after while() conditions * Fix compilation because of macro being modified * Add braces to for loop * Add braces after if/goto * Move comments up * Remove extra () in the 'return ...;' statements * More remove extra () in the 'return ...;' statements * More remove extra () in the 'return ...;' statements after merge * Fix inconsistent patterns are xxx == NULL vs !xxx * More "{}" for "if() break;" and "if() continue;" * More "{}" after if() short statement * More "{}" after "if () return;" statement * More fix inconsistent patterns are xxx == NULL vs !xxx * Revert some modificaion on SDL_RLEaccel.c * SDL_RLEaccel: no short statement * Cleanup 'if' where the bracket is in a new line * Cleanup 'while' where the bracket is in a new line * Cleanup 'for' where the bracket is in a new line * Cleanup 'else' where the bracket is in a new line (cherry picked from commit 6a2200823c66e53bd3cda4a25f0206b834392652 to reduce conflicts merging between SDL2 and SDL3)
Sam Lantinga ea8f8b6d 2022-11-21T16:36:10 Updated to version 2.27.0 for development
Sam Lantinga 0bfeed06 2022-11-21T16:15:58 Updated to version 2.26.0 for release
Sam Lantinga 78ea6af2 2022-11-17T09:01:35 Updated to version 2.25.1 for release candidate
Sylvain ddad901c 2022-11-17T10:43:45 Remove unneeded semicolon
Hubert Maier 3369b016 2022-10-30T08:43:04 SDL_PS2_MAIN.C: Correct spelling mistake untill -> until
Pierre Wendling 83ec6062 2022-09-18T13:46:09 N3DS: Move gfxInit and hidInit from main to video.
Pierre Wendling af2bc2ed 2022-09-18T10:52:35 N3DS: Use osSetSpeedupEnable instead of PTMSYSM.
Pierre Wendling 65527537 2021-03-30T04:32:39 N3DS port (squashed) A dedicated renderer using Citro3D would likely allow for better much better graphical performances.
Sam Lantinga bb74af1e 2022-09-28T00:01:54 Allow including SDL_uikit_main.c in Apple multi-platform builds This file just won't do anything on macOS
Francisco Javier Trujillo Mata a4f84803 2022-08-24T20:42:08 Disable fileXio and patch fio
Sam Lantinga 6e9c14e5 2022-08-19T09:38:42 Updated to version 2.25.0 for development
Sam Lantinga 8c9beb0c 2022-08-19T08:44:09 Updated to version Updated to version 2.24.0 for release
Sam Lantinga f1416ef2 2022-08-12T20:27:22 Updated to version 2.23.2 for release candidate
Francisco Javier Trujillo Mata d355ea99 2022-08-08T11:55:04 Add a way to avoid IOP reset
Francisco Javier Trujillo Mata c5fe234d 2022-08-07T23:07:02 Improve SDL main adding usb drivers
Francisco Javier Trujillo Mata a054a5f7 2022-06-29T01:09:17 Improve SDL2 main, adding memory card and usb drivers
chalonverse 3b191580 2022-06-27T17:19:39 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
Francisco Javier Trujillo Mata 84d69da4 2022-03-20T19:42:06 Initial SDL_ps2_main implementation
Sam Lantinga b004133f 2022-06-16T12:49:17 Updated to version 2.23.1 for pre-release checkpoint
Ozkan Sezer 63e12cf6 2022-06-06T22:55:56 SDL_windows_main.c: replace CopyMemory() with SDL_memcpy()
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
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>
Michael Fitzmayer fbd230bb 2022-05-03T17:51:49 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 4f5f0fc36cc7f34fad05e45671dfa7b8dc32fd51. * N-Gage: fix clipping issue by providing proper math functions
Sam Lantinga 5394238c 2022-04-30T11:40:26 Don't include the internal header for a file intended for use by applications
Sam Lantinga fa29e2d7 2022-04-25T13:45:51 Updated to version 2.0.23 for development
Sam Lantinga 505d6a4a 2022-04-08T18:18:56 Update version to 2.0.22 for release
Sam Lantinga a0e3c884 2022-01-17T15:32:27 Updated to version 2.0.21 for development
kenmays 094e9440 2022-01-12T06:42:17 haiku: Remove BDirectWindow, fix OpenGL handling. From e6cc4e7f4b8189be55dd3b0e13e54e59f73d7672 Mon Sep 17 00:00:00 2001 From: X512 <danger_mail@list.ru> Date: Thu, 30 Jan 2020 04:01:58 +0900 Subject: libsdl2: Remove BDirectWindow, fix OpenGL handling. * BDirectWindow changed to BWindow. * Implemented fullscreen. * Introduced view for non-OpenGL drawing. * Drawing thread removed, window thread is used instead. * Use BGLView as OpenGL context. Implement proper context switching and OpenGL locking. Only one context per window is supported. BGLView should be not deleted when window is closed, it deleted when deleting context.
Sam Lantinga 92946348 2022-01-07T18:28:25 Updated to version 2.0.20 for release
Sam Lantinga 120c76c8 2022-01-03T09:40:00 Updated copyright for 2022
Ozkan Sezer 8cee50ee 2021-12-07T19:32:56 removed stdlib.h from SDL_psp_main.c now that exit() is gone.
Wouter Wijsman da5dbb47 2021-12-07T16:43:50 Fix SDL2main on PSP (#5076) - Fix SDL2main on PSP SDL2main was not working for PSP, because it wasn't being activated and it wasn't unsetting the main. Besides that a debug screen being started was causing issues with joystick input and the sceKernelExitGame calli is no longer needed with the current PSPDEV SDK. - Clean up imports in PSP main - Set PSP GPU and user modes in main - Fix exit callback in PSP main
Sam Lantinga 5fc901d4 2021-11-30T09:58:21 Updated to version 2.0.19 for development
Sam Lantinga 7242075b 2021-11-26T08:12:45 Updated version to 2.0.18 for release
Sam Lantinga 3f6ebfff 2021-08-10T15:02:36 Updated to version 2.0.17 for development
Sam Lantinga a91ab883 2021-08-06T12:28:03 Fixed building on Windows with cmake, ninja, and clang
Sam Lantinga cb1fd30e 2021-07-31T13:28:54 Updated to version 2.0.16 for release
Sam Lantinga 3a4b217d 2021-07-31T12:44:29 Allow defining SDL_MAIN_HANDLED on iOS if you're using another runtime that provides an application delegate
Sam Lantinga deed21a8 2021-07-31T12:44:11 Removed useless forward declaration
Steven Noonan f1ad942a 2021-04-22T17:24:05 SDL_windows_main: use HeapAlloc/HeapFree for command line arguments If a developer uses SDL_SetMemoryFunctions, we can't rely on SDL_free() working when SDL_main() returns. Signed-off-by: Steven Noonan <steven@valvesoftware.com> Signed-off-by: Sam Lantinga <slouken@libsdl.org>
Ozkan Sezer 8cb421b2 2021-01-04T10:20:10 SDL_windows_main.c: use new WIN_StringToUTF8W macro
Sam Lantinga 9130f7c3 2021-01-02T10:25:38 Updated copyright for 2021
Sam Lantinga 350f1b0d 2020-12-22T10:36:15 Updated SDL to version 2.0.15 for development
Sam Lantinga a2098a47 2020-12-08T18:56:06 Updated SDL to 2.0.14 in preparation for release candidate
Ryan C. Gordon 940419b0 2020-11-10T13:09:59 uikit: Fixed a typo in a comment.
Ryan C. Gordon fa23e3d0 2020-05-04T02:27:29 locale: Implemented SDL_GetPreferredLocales(). This was something I proposed a long time ago, Sylvain Becker did additional work on it, then back to me. Fixes Bugzilla #2131.
Sam Lantinga 983bbf9e 2020-03-10T18:35:31 Backed out changeset 51622f74dc85
Sam Lantinga 93ed3c8b 2020-03-10T18:25:47 Updated SDL to version 2.0.13 for development builds
Sam Lantinga 4fb06a2a 2020-03-10T18:25:47 Updated SDL to version 2.0.13 for development builds
Sam Lantinga 74ed2156 2020-03-01T14:58:16 Updated version to 2.0.12 for release candidate build
Sam Lantinga a8780c6a 2020-01-16T20:49:25 Updated copyright date for 2020
Peter Kosyh 33ae5e5e 2019-11-11T22:23:33 haiku: mouse_relative fix Partially fixes Bugzilla #4442.
Peter Kosyh 79510b75 2019-11-11T22:22:40 haiku: mouse->ShowMouse method added Partially fixes Bugzilla #4442.
Gerasim Troeglazov 95a402d7 2019-11-11T22:21:17 haiku: Add support for relative mouse mode. Partially fixes Bugzilla #4442.
Gerasim Troeglazov bd648bd5 2019-11-11T22:18:21 haiku: Add simple relative mode for mouse. Partially fixes Bugzilla #4442.
Peter Kosyh 55b5d8dc 2019-11-11T21:59:39 haiku: Invert mouse wheel values to match what SDL expects. Partially fixes Bugzilla #4442.
EXL b22fb9e2 2019-11-11T16:44:40 haiku: Implement message box for Haiku Add implementation for functions: SDL_ShowSimpleMessageBox() SDL_ShowMessageBox() Add simple customization support also. Fix build for x86_gcc2. Partially fixes Bugzilla #4442.
Sam Lantinga 3fe2d836 2019-09-22T10:37:16 Updated SDL development builds to version 2.0.11
Ozkan Sezer 1b7fc81e 2019-07-31T19:40:50 minor whitespace tidy-up.
Sam Lantinga f8400cbb 2019-07-31T09:11:20 Fixed bug 4692 - Command line parsing Galadrim As I have seen, SDL implements its own command line parser for Windows in SDL_windows_main.c. Unfortunately, it doesn't seem to allow command line arguments with trailing backslashes if quoting is required. Usually, when you write an application that gets command line arguments passed as argc and argv, the parsing is done by parse_cmdline. The Windows API also provides the function CommandLineToArgvW, so an application can parse itself if only the command line string is provided. Both functions behave almost identically according to their documentation. If the argument "\\" (including the quotes) is passed, they both turn it into a single backslash. The SDL command line parser on the other hand doesn't recognize the second quote character as the closing character in this example and therefore includes it in the parsed argument. The parser does not count the number of backslashes preceding a quote. It always treats a quote as escaped if a backslash is in front of it. Therefore, it should be impossible to quote and escape an argument correctly, if it has a trailing backslash and contains characters that require quoting. Of course, each application is allowed to implement its own parsing rules, so SDL is free to do so. But the problem I see is that there are arguments, that are impossible to be passed to the parser correctly, as I described above. Is there a reason, why SDL does not simply use CommandLineToArgvW instead of implementing its own parser? Here are some links that show that correct argument parsing, as it is usually done in Windows, is quite complicated: https://docs.microsoft.com/en-us/windows/desktop/api/shellapi/nf-shellapi-commandlinetoargvw http://www.windowsinspired.com/how-a-windows-programs-splits-its-command-line-into-individual-arguments/
Ozkan Sezer 4953e050 2019-07-31T05:11:40 use SDL_zeroa at more places where the argument is an array.
Sam Lantinga 67c67f3a 2019-06-17T10:13:28 Updated version to 2.0.10
Sam Lantinga de82759c 2019-03-19T07:53:33 Added support for building SDL as a dynamic library on iOS
Sam Lantinga 5e13087b 2019-01-04T22:01:14 Updated copyright for 2019
Ryan C. Gordon e542d1a3 2018-10-29T20:18:50 winmain: Patched to compile on C89 compilers.
Ryan C. Gordon f434a98c 2018-10-29T20:00:03 winmain: Don't use SDL_malloc (or SDL_stack_alloc, which might be malloc). Otherwise, we are using the allocator before the app can set up its own hooks. Now we use VirtualAlloc, and WideCharToMultiByte (because SDL_iconv uses SDL_malloc, too!) to get ready to call into SDL_main. This also makes console_wmain() call into the same routines as everything else, so we don't have to deal with those allocations, too. Hopefully we end up with the same results from GetCommandLine() as we do in wargv. Fixes Bugzilla #4340.
Ryan C. Gordon b262b0eb 2018-10-22T20:50:32 Small stack allocations fall back to malloc if they're unexpectedly large.
Sam Lantinga bc6c1997 2018-09-26T10:08:14 Updated version to 2.0.9
Sam Lantinga 5febdfce 2018-09-24T11:49:25 Fixed whitespace
Ryan C. Gordon 941c5b47 2018-08-07T18:07:11 haiku: Rename internal functions from BE_* to HAIKU_* Fixes Bugzilla #2349.
Sam Lantinga 1143857d 2018-02-10T12:43:11 Fixed bug 4073 - Unquoted Unicode argument parsing broken on Windows due to incorrect usage of SDL_isspace()
Sam Lantinga e3cc5b2c 2018-01-03T10:03:25 Updated copyright for 2018
Sam Lantinga 2c5724ef 2017-11-04T21:58:48 Updated version to 2.0.8 since SDL_image depends on it
David Ludwig 0e032d58 2017-10-24T13:21:11 WinRT: Move Windows::Foundation::Initialize to SDL2.dll, from SDL_main. This allows C# UWP applications to use SDL2's SDL_WinRTRunApp function. Kudos to Ethan Lee (flibitijibibo@flibitijibibo.com) for the patch. Thanks!
Sam Lantinga 0ce23a54 2017-10-12T08:08:04 Updated version to 2.0.7
Sam Lantinga dbb0a2aa 2017-08-28T14:34:15 Removed the need for libSDL2main.a on Android, and separated JNI initialization out for other integrations
Sam Lantinga 2dc5d32f 2017-08-18T18:16:37 Updated version to 2.0.6
Sam Lantinga df2d2994 2017-08-13T18:12:06 Fixed bug 2812 - Make libSDL2main.a usable on Android via a dummy symbol Jonas Kulla This eliminates the need to manually compile in SDL_main_android.c. Instead, add "-lSDL2main -Wl,-u,SDL_main_dummy" when linking. I don't know how the nkd-build process works, but unless it was for some reason linking libSDL2main.a it should be unaffected.
Philipp Wiesemann c3bf69ca 2017-07-07T23:00:22 haiku: Fixed compiling without OpenGL support.
Philipp Wiesemann 4b47fa38 2017-06-04T23:15:47 Removed duplicate includes.
Olli Kallioinen 11289b76 2017-06-04T21:25:57 Android cmake build fixed to work with the official android gradle plugin
Philipp Wiesemann 07b0df0a 2017-06-02T22:15:37 haiku: Changed internal variable to be static.
Ryan C. Gordon 619ab7a2 2017-05-01T18:39:05 haiku: Various fixes from haikuports. Based on patch here: https://github.com/haikuports/haikuports/blob/master/media-libs/libsdl2/patches/libsdl2-2.0.5.patchset
Philipp Wiesemann 63e83a31 2017-01-21T22:01:17 Haiku: Removed unused variable. Found by Cppcheck.