|
3b4c2fdf
|
2018-02-13T08:13:29
|
|
Fixed bug 3947 - replace strlcpy with memcpy in SDL_strdup()
|
|
11c348b4
|
2018-01-17T11:53:09
|
|
SDL_log10
|
|
e3cc5b2c
|
2018-01-03T10:03:25
|
|
Updated copyright for 2018
|
|
bcdf8b91
|
2017-11-04T17:35:03
|
|
Added SDL_fmod() and SDL_fmodf()
|
|
34502143
|
2017-11-04T15:34:14
|
|
Added float versions of SDL's math functions
|
|
758156a7
|
2017-11-04T09:37:29
|
|
Fixed bug 3917 - Android, issues with getManifestEnvironmentVariable
We're going to push the manifest environment variables from the Java side instead of continually querying for them from the native side.
|
|
8fd0c22a
|
2017-10-24T00:17:07
|
|
Added the ability to set SDL hints from AndroidManifest.xml (thanks Rachel!)
This is especially useful for things like the accelerometer hint which could be needed before application main().
|
|
fc60db86
|
2017-10-12T17:17:09
|
|
Fixed compiler warning
|
|
21cd2df6
|
2017-10-12T14:02:24
|
|
Fixed compiler warning
|
|
9c580e14
|
2017-10-12T13:44:28
|
|
Added functions to query and set the SDL memory allocation functions:
SDL_GetMemoryFunctions()
SDL_SetMemoryFunctions()
SDL_GetNumAllocations()
|
|
bef0fec1
|
2017-10-12T14:28:05
|
|
make sure that SDL_malloc(0) or SDL_calloc(0,x) doesn't return NULL.
|
|
19114b03
|
2017-09-10T12:42:38
|
|
Fixed bug 3813 - gcc7 fallthrough warnings in SDL_iconv.c and SDL_pixels.c
|
|
8ed16ea4
|
2017-09-10T10:43:04
|
|
Fixed compile warning
|
|
1b2492ed
|
2017-09-08T15:08:03
|
|
Fixed 64-bit build warning
|
|
c1fd0fbb
|
2017-09-04T22:14:57
|
|
Fixed compiler warning with mingw-w64
|
|
ae667da6
|
2017-08-29T15:52:49
|
|
Fixed a bunch of compiler warnings.
|
|
620f5342
|
2017-08-29T00:36:17
|
|
stdlib: An implementation of SDL_scalbn using ldexp() (thanks, Ozkan!).
Fixes Bugzilla #3767.
|
|
fcf83e79
|
2017-08-21T16:30:24
|
|
Fixed bug 3768 - provide a quick copysign() solution for watcom
Ozkan Sezer
The following patch provides a quick copysign solution for Watcom/x86
|
|
f1829d95
|
2017-08-13T20:37:49
|
|
Added SDL_wcscmp()
|
|
affab6ad
|
2017-08-12T00:01:24
|
|
More fixes for the SDL_scanf code
|
|
b5ea3c6d
|
2017-08-11T21:30:06
|
|
Fixed bug 3284 - minor correction for SDL_setenv on _WIN32__ platform
Coriiander
Here is a minor correction for a non-breaking mistake in SDL_setenv for __WIN32__ platform. See below for details.
FILE:
"SDL/src/stdlib/SDL_getenv.c"
FUNCTION: (__WIN32__ platform)
int SDL_setenv(const char *name, const char *value, int overwrite)
CODE:
if (!overwrite) {
char ch = 0;
const size_t len = GetEnvironmentVariableA(name, &ch, sizeof (ch));
if (len > 0) {
return 0; /* asked not to overwrite existing value. */
}
}
WHAT'S WRONG:
The 3th argument to GetEnvironmentVariable (being DWORD nSize) must be the number of characters, not the number of bytes. SDL currently passes "the size of 1 char", rather "1". While it is non-breaking (1=1 after all), it is incorrect. Furthermore there is no need to specify the 2nd and 3th arguments at all.
CORRECTION 1: (corrected argument_
if (!overwrite) {
char ch = 0;
const size_t len = GetEnvironmentVariableA(name, &ch, 1);
if (len > 0) {
return 0; /* asked not to overwrite existing value. */
}
}
CORRECTION 2: (stripped of unneeded code)
if (!overwrite) {
if (GetEnvironmentVariableA(name, NULL, 0) > 0) {
return 0; /* asked not to overwrite existing value. */
}
}
|
|
441d9ba2
|
2017-08-11T19:36:12
|
|
Fixed bug 3341 - SDL_sscanf() problem
e_pluschauskas
Why does SDL_sscanf() always returns the number of format specifiers and doesn't implements standard C library behavior?
|
|
d4086e4a
|
2017-05-29T03:01:05
|
|
stdlib: added SDL_utf8strlen().
|
|
29a047df
|
2017-05-29T00:51:38
|
|
Fixed whitespace code style.
|
|
c93bca48
|
2017-02-14T02:49:08
|
|
stdlib: Fixed crash on SDL_snprintf("%s", NULL).
Like other C runtimes, it should probably produce the string "(null)".
This bug probably only affected Windows, as most platforms use their standard
C runtime's snprintf().
|
|
5cb1ca55
|
2017-01-18T11:57:27
|
|
Fixed building with mingw32
|
|
45b774e3
|
2017-01-01T18:33:28
|
|
Updated copyright for 2017
|
|
880842cf
|
2016-12-31T16:14:51
|
|
Fixed bug 3531 - internal SDL_vsnprintf implementation access memory outside given buffer ranges
Tristan
The internal SDL_vsnprintf implementation accesses memory outside buffer. The bug existed also inside the format (%) processing, which was fixed with Bug 3441.
But there is still an invalid access, if we do not have any format inside the source string and the destination string is shorter than the format string. You can use any string for this test, as long it is longer than the buffer.
Example:
va_list argList;
char buffer[4];
SDL_vsnprintf(buffer, sizeof(buffer), "Testing", argList);
The bug is located on the 'else' branch of the format char test:
while (*fmt) {
if (*fmt == '%') {
...
} else {
if (left > 1) {
*text = *fmt;
--left;
}
++fmt;
++text;
}
}
if (left > 0) {
*text = '\0';
}
As you can see that text is always incremented, even when left is already one. When then on the last lines, *text is assigned the NULL char, the pointer is located outside bounds.
|
|
232ae688
|
2016-11-23T17:20:28
|
|
Still more compiler warning fixes for various platforms.
|
|
57d01d7d
|
2016-11-13T22:57:41
|
|
Patch from Sylvain to fix clang warnings
|
|
74e1dd4c
|
2016-11-11T13:14:00
|
|
Define _GNU_SOURCE when building SDL
|
|
79f6ba5a
|
2016-11-11T03:18:16
|
|
Fixed signed/unsigned comparison warnings in Visual Studio
|
|
40b571c9
|
2016-11-06T10:01:08
|
|
Fixed bug 3468 - _allshr in SDL_stdlib.c is not working properly
Mark Pizzolato
On Windows with Visual Studio, when building SDL as a static library using the x86 (32bit) mode, several intrinsic operations are implemented in code in SDL_stdlib.c.
One of these, _allshr() is not properly implemented and fails for some input. As a result, some operations on 64bit data elements (long long) don't always work.
I classified this bug as a blocker since things absolutely don't work when the affected code is invoked. The affected code is only invoked when SDL is compiled in x86 mode on Visual Studio when building a SDL as a static library. This build environment isn't common, and hence the bug hasn't been noticed previously.
I reopened #2537 and mentioned this problem and provided a fix. That fix is provided again here along with test code which could be added to some of the SDL test code. This test code verifies that the x86 intrinsic routines produce the same results as the native x64 instructions which these routines emulate under the Microsoft compiler. The point of the tests is to make sure that Visual Studio x86 code produces the same results as Visual Studio x64 code. Some of the arguments (or boundary conditions) may produce different results on other compiler environments, so the tests really shouldn't be run on all compilers. The test driver only actually exercised code when the compiler defines _MSC_VER, so the driver can generically be invoked without issue.
|
|
8109b137
|
2016-10-17T21:47:33
|
|
Partial fix for bug 3092 - Statically link sdl2 with /MT for msvc
Mike Linford
I'm also having trouble statically linking SDL2 on Visual Studio 2015 with /MT. My symptom is that memcpy is being defined twice.
|
|
9db5e9aa
|
2016-10-10T02:58:29
|
|
Made #if defined(X) consistent
|
|
6dedbc43
|
2016-10-10T02:58:12
|
|
Make sure we have iconv.h before building with it
|
|
73f2c541
|
2016-10-07T16:44:42
|
|
Fixed bug 2885 - SDL_stdinc.h doesn't need to include iconv.h
Ryan C. Gordon
We still include iconv.h in SDL_stdinc.h, probably because this header might have referenced the native iconv functions and types directly. Since these are hidden behind a stable ABI now and never just a #define for the system iconv, we shouldn't need this header included from a public SDL header anymore, slowing down external apps compiles and pulling tons of stuff into the namespace.
|
|
46f44f66
|
2016-10-04T14:25:31
|
|
Fixed potential buffer overflow in SDL_vsnprintf() (thanks, Taylor!).
Fixes Bugzilla #3441.
"When using internal SDL_vsnprintf(), and source string length is greater
than destination, the final NULL char will be written beyond destination size.
Primary issue that is SDL_strlcpy returns length of source string
(SDL_PrintString()), not how much is written to destination. The destination
ptr is then incremented by this length before the sanity check is done.
Destination string is properly terminated, but an extra NULL char will be
written beyond destination buffer length.
Patch used internally is attached which fixes primary issue with SDL_strlcpy()
in SDL_PrintString() and adjusts sanity checks to increment destination ptr
safely."
|
|
5333deab
|
2016-03-11T08:30:18
|
|
Quick fix for qsort off-by-one error.
|
|
32c70cc5
|
2016-02-21T13:07:14
|
|
stdlib: Restored previous qsort() implementation; the licensing is resolved.
Thanks to Gareth McCaughan for changing his code to the zlib license on
our behalf!
|
|
09ae4df5
|
2016-02-15T03:37:01
|
|
Another attempt to fix Windows build.
|
|
18f74c6e
|
2016-02-15T03:21:26
|
|
Patched to compile on Visual Studio.
|
|
014956ac
|
2016-02-15T03:16:46
|
|
Replaced SDL_qsort with public domain code from PDCLib: http://pdclib.e43.eu/
|
|
e2fd1c0f
|
2016-01-02T11:17:06
|
|
Backed out commit 80ce90dbc266, this causes Visual Studio build failure on buildbot
|
|
ac444cd3
|
2016-01-02T10:25:53
|
|
Fixed bug 3092 - Statically link sdl2 with /MT for msvc
Martin Gerhardy
According to https://msdn.microsoft.com/de-de/library/2kzt1wy3%28v=vs.120%29.aspx when one is using /MT for msvc compilations the libcmt.lib is already linked to the binary. This lib includes the symbol that is now guarded (see attached patch) by the #ifndef _MT.
|
|
42065e78
|
2016-01-02T10:10:34
|
|
Updated copyright to 2016
|
|
0e45984f
|
2015-06-21T17:33:46
|
|
Fixed crash if initialization of EGL failed but was tried again later.
The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly
uninitialized data structure if loading the library first failed. A later try to
use EGL then skipped initialization and assumed it was previously successful
because the data structure now already existed. This led to at least one crash
in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was
dereferenced to make a call to eglBindAPI().
|
|
d98cfe14
|
2015-06-07T20:00:20
|
|
Let's assume that if VS2005 and VS2010 do it, VS2008 probably does, too.
|
|
753f95c5
|
2015-06-07T19:58:42
|
|
VS2005 tweaks (thanks, Ozkan!).
Fixes Bugzilla #2895.
His notes:
The following trivial changes make SDL2 tree (mostly) compatible with Visual
Studio 2005:
* SDL_stdlib.c: Similar to VS2010 and newer, VS2005 also generates memcpy(),
(it also generates memset(), see below), so propagate the #if condition to
cover VS2005.
* SDL_pixels.c (SDL_CalculateGammaRamp): VS2005 generates a memset() call for
gamma==0 case, so replace the if loop with SDL_memset().
* SDL_windowsvideo.h: Include msctf.h only with VS2008 and newer, otherwise
include SDL_msctf.h
* SDL_windowskeyboard.c: Adjust the #ifdefs so that SDL_msctf.h inclusion is
always recognized correctly.
|
|
75702ffe
|
2015-05-28T14:34:38
|
|
Make sure we have the vsscanf() prototype (thanks, Ozkan!).
issue seen with glibc-2.8.
Fixes Bugzilla #2721.
|
|
2c4a6ea0
|
2015-05-26T06:27:46
|
|
Updated the copyright year to 2015
|
|
b72938c8
|
2015-04-20T12:22:44
|
|
Windows: Always set the system timer resolution to 1ms by default.
An existing hint lets apps that don't need the timer resolution changed avoid
this, to save battery, etc, but this fixes several problems in timing, audio
callbacks not firing fast enough, etc.
Fixes Bugzilla #2944.
|
|
fe6c797c
|
2015-04-10T23:30:31
|
|
Fixed an iOS view orientation issue when SDL_GL_CreateContext or SDL_CreateRenderer is called.
|
|
b88ca1b4
|
2015-02-10T16:28:56
|
|
the last parameter of XChangeProperty is the number of elements.. and when the element format is 32.. the element is "long" so we have 5 long elements here.
Yes this seems confusing as on mac+linux Long is either 32 or 64bits depending on the architecture, but this is how the X11 protocol is defined. Thus 5 is the correct value for the nelts here. Not 5 or 10 depending on the architecture.
More info on the confusion https://bugs.freedesktop.org/show_bug.cgi?id=16802
|
|
b48e54aa
|
2015-01-26T22:00:29
|
|
Fixed bug 2802 - [patch] Fix android build compiling in wrong filesystem implementation
Jonas Kulla
The configure script didn't differentiate between Linux and Android, unconditionally compiling in the unix implementation of SDL_sysfilesystem.c.
I'm probably one of the very few people building SDL for android using classic configure + standalone toolchain, so this has gone undetected all along.
|
|
a823982e
|
2015-01-05T01:41:42
|
|
Clang static analysis builds should use C runtime directly.
This is a little macro magic to use malloc() directly instead of SDL_malloc(),
etc, so static analysis tests that know about the C runtime can function
properly, and understand that we are dealing with heap allocations, etc.
This changed our static analysis report from 5 outstanding bugs to 30.
5x as many bugs were hidden by SDL_malloc() not being recognized as malloc()
by the static analyzer!
|
|
70438be2
|
2014-12-03T10:55:23
|
|
WinRT: fixed bug whereby SDL would override an app's default orientation
WinRT apps can set a default, preferred orientation via a .appxmanifest file.
SDL was overriding this on app startup, and making the app use all possible
orientations (landscape and portrait).
Thanks to Eric Wing for the heads up on this!
|
|
9c398852
|
2014-11-22T22:20:40
|
|
Corrected header file documentation comment.
|
|
24c86b55
|
2014-09-11T19:24:42
|
|
[X11] Reconcile logical keyboard state with physical state on FocusIn
since the window system doesn't do it for us like other platforms.
This prevents sticky keys and missed keys when going in and out
of focus, for example Alt would appear to stick if switching away
from an SDL app with Alt-Tab and had to be pressed again.
CR: Sam
|
|
1ea86978
|
2014-08-17T13:11:55
|
|
Removed SDL_round() because the license wasn't compatible with zlib
|
|
4e7db78e
|
2014-08-16T23:23:15
|
|
Added SDL_round(), contributed by Benoit Pierre - thanks!
|
|
a0b68e81
|
2014-07-27T17:44:10
|
|
Fixed bug 2537 - _allmul in SDL_lib.c is not working properly
|
|
0d673844
|
2014-06-21T11:52:53
|
|
Fixed bug 2596 - SDL_SetError fails on on NULL on systems with vsnprintf
sfalexrog
On systems with vsnprintf call SDL_SetError fails when passed a NULL as an argument. SDL's implementation checks for NULL (as seen in the commit: https://hg.libsdl.org/SDL/rev/835403a6aec8), but system implementation may crash.
|
|
7e52722d
|
2014-06-20T11:10:16
|
|
Fix compiler warnings in Native Client and Linux builds.
|
|
6101e4b2
|
2014-06-07T18:20:01
|
|
Added SDL_sqrtf(), SDL_tan(), SDL_tanf()
|
|
40538446
|
2014-06-07T17:31:50
|
|
Fixed crash with SDL_SetError(NULL)
|
|
da6d9a9f
|
2014-06-04T10:56:56
|
|
Added annotations to help code analysis tools
CR: Bruce Dawson
|
|
d12d7952
|
2014-05-10T21:48:46
|
|
Align pointer in SDL_memset before doing Uint32 loop
Some more recent compilers emit SSE aligned store instructions for the loop,
causing crashes if the destination buffer isn't aligned on a 32-bit boundary.
This would also crash on platforms like ARM that require aligned stores.
This fixes a crash inside SDL_FillRect that happens with the official x64 mingw
build.
|
|
1a4c0dac
|
2014-05-10T11:27:43
|
|
Temporary fix for bug 2494 - Crashes due to the non thread-safe SDL_malloc/SDL_free on Windows
We'll define USE_LOCKS as a temporary fix until an alternative like ptmalloc, jemalloc, or nedmalloc can be investigated.
http://www.malloc.de/en/
http://www.canonware.com/jemalloc/
http://www.nedprod.com/programs/portable/nedmalloc/
SDL allocates memory very infrequently, so this is probably a decent fix for a while.
|
|
3dcb451f
|
2014-04-09T21:29:19
|
|
Added a README file regarding WinRT support
To note, this file is currently formatted with CRLF line endings, rather than
LF, to allow the file to be viewed with Notepad.
|
|
f018ca46
|
2014-03-19T21:39:55
|
|
Add input validation to SDL_getenv/SDL_setenv; update Stdlib testsuite; add Hints testsuite
|
|
1367bf87
|
2014-03-09T11:36:47
|
|
Integrated David Ludwig's support for Windows RT
|
|
7c33f233
|
2014-02-22T10:40:12
|
|
Thou shalt not use more than 4k local variables in this code.
|
|
58edac3e
|
2014-02-02T00:53:27
|
|
Fixed bug 2374 - Update copyright for 2014...
Is it that time already??
|
|
35ab76d0
|
2013-12-11T21:17:24
|
|
Fixed bug 2050 - Obvious bugs in SDL_ltoa and SDL_lltoa
pjz
SDL_ltoa(-2147483648,s,10) only returns "-" because there is a bug in the code:
if ( value < 0 ) {
*bufp++ = '-';
value = -value;
}
but -(-2147483648) is still -2147483648 (0x80000000) as signed int (or long), so the following loop doesn't run at all. Similar bug are also in SDL_lltoa.
BTW, there is no sanity check for radix.
|
|
d01ad02b
|
2013-12-09T15:17:20
|
|
Hook up SDL_acos and SDL_asin properly.
|
|
31caa22d
|
2013-12-09T13:30:35
|
|
Patched stdlib changes to compile on Windows.
|
|
f848adff
|
2013-11-29T10:06:08
|
|
Improve Android pause/resume behavior.
|
|
46740a5a
|
2013-11-28T22:09:21
|
|
WinRT: merged with latest SDL 2.x/HG code
SDL 2.x recently accepted patches to enable OpenGL ES 2 support via Google's ANGLE library. The thought is to try to eventually merge SDL/WinRT's OpenGL code with SDL-official's.
|
|
8574c081
|
2013-11-27T00:29:46
|
|
Fixed bug 2274 - SDL_ceil is incorrectly implemented when HAVE_LIBC is not defined
Ghassan Al-Mashareqa
The SDL_ceil function is implemented incorrectly when HAVE_CEIL is not defined (HAVE_LIBC not defined).
The following code:
double val = SDL_ceil(2.3);
printf("%g", val);
prints "2.0", as STD_ceil is defined as:
double
SDL_ceil(double x)
{
#ifdef HAVE_CEIL
return ceil(x);
#else
return (double)(int)((x)+0.5);
#endif /* HAVE_CEIL */
}
This functions is used in the SDL_BuildAudioResampleCVT function of the audio subsystem (SDL_audiocvt.c), and causes a bug in that function.
|
|
7e1289af
|
2013-11-24T23:56:17
|
|
Make internal SDL sources include SDL_internal.h instead of SDL_config.h
The new header will include SDL_config.h, but allows for other global stuff.
|
|
e7693740
|
2013-11-24T23:35:38
|
|
Added SDL_vsscanf().
|
|
69c5d21d
|
2013-10-27T21:26:46
|
|
WinRT: merged with SDL 2.0.1 codebase
|
|
12ca3ce3
|
2013-10-17T23:02:29
|
|
Fixed building using MinGW
Our SDL_windows.h needed to be included before anything else so UNICODE is defined.
|
|
cefffd61
|
2013-09-05T06:59:34
|
|
Fixed bug 2082 - SDL stdlib implementation does not force upper case for %X format specifier
norfanin
When SDL_vsnprintf handles the %x format specifier, a boolean is set to signal forced lower case. It also should be able to signal forced upper case for the %X specifier. A boolean is not sufficient anymore. The attached patch adds an enum for the three cases: lower, upper and no change.
|
|
f79fc33a
|
2013-08-29T08:29:21
|
|
Christoph Mallon: Remove pointless if (x) before SDL_free(x)
|
|
d41fdc94
|
2013-08-13T20:09:52
|
|
WinRT: build fixes and additional WinRT-related integrations with SDL 2.0.0
|
|
dad42067
|
2013-08-12T11:13:50
|
|
Fixes #2022, do not resume on Android when surfaceChanged
If the app is in landscape mode and the user presses the power button, a pause
is followed immediately by a surfaceChanged event because the lock screen
is shown in portrait mode. This triggers a "false" resume.
So, we just pause and resume following the onWindowFocusChanged events.
Also, wait for SDL_APP_WILLENTERBACKGROUND and SDL_APP_DIDENTERBACKGROUND before
blocking the event pump.
|
|
1ad936eb
|
2013-08-11T19:56:43
|
|
Fixed bug 2027 - Full-screen appears to be broken - hang in SDL_DestroyWindow()
Rainer Deyke
I'm running Linux Mint 15 with the Cinnamon window manager. SDL_DestroyWindow consistently locks up for me when the window if fullscreen.
|