Sat, 12 Aug 2017 12:24:59 -0700Fixed bug 3128 - Removing all the static variables from android SDLActivity and accompanying JNI calls.
Sam Lantinga <slouken@libsdl.org> [Sat, 12 Aug 2017 12:24:59 -0700] rev 11239
Fixed bug 3128 - Removing all the static variables from android SDLActivity and accompanying JNI calls.

owen

I removed all the static variables from SDLActivity.java

Updated all the SDL_android.c jni calls as well

I added a new function to SDL_android.c/ h
void Android_JNI_SeparateEventsHint(const char* c);

This is called by SDL_androidtouch.c so that this TU doesn't need to call any JNI functions.

Sat, 12 Aug 2017 08:15:09 -0700Fixed bug 3191 - haptic system on android?
Sam Lantinga <slouken@libsdl.org> [Sat, 12 Aug 2017 08:15:09 -0700] rev 11238
Fixed bug 3191 - haptic system on android?

Patch provided by jintiao and Milan Nikolic, thanks!

Sat, 12 Aug 2017 08:06:16 -0700Fixed part of bug 3227 - patch for multiple buttons at the same time not working
Sam Lantinga <slouken@libsdl.org> [Sat, 12 Aug 2017 08:06:16 -0700] rev 11237
Fixed part of bug 3227 - patch for multiple buttons at the same time not working

Philipp Wiesemann

There is another problem with the current implementation which maybe should be fixed first (to prevent some work). It was written as if it would get the number of a button from the Java side but actually it gets the state of all buttons. That is why it should not work if more than one button is pressed at once.

Sat, 12 Aug 2017 00:04:46 -0700Fixed compiler warnings on Visual Studio 2013
Sam Lantinga <slouken@libsdl.org> [Sat, 12 Aug 2017 00:04:46 -0700] rev 11236
Fixed compiler warnings on Visual Studio 2013

Sat, 12 Aug 2017 00:01:24 -0700More fixes for the SDL_scanf code
Sam Lantinga <slouken@libsdl.org> [Sat, 12 Aug 2017 00:01:24 -0700] rev 11235
More fixes for the SDL_scanf code

Fri, 11 Aug 2017 23:54:06 -0700Fixed Android build
Sam Lantinga <slouken@libsdl.org> [Fri, 11 Aug 2017 23:54:06 -0700] rev 11234
Fixed Android build

Fri, 11 Aug 2017 21:47:31 -0700Fixed bug 3258 - SDL_TryLockMutex blocks for pthreads with FAKE_RECURSIVE_MUTEX
Sam Lantinga <slouken@libsdl.org> [Fri, 11 Aug 2017 21:47:31 -0700] rev 11233
Fixed bug 3258 - SDL_TryLockMutex blocks for pthreads with FAKE_RECURSIVE_MUTEX

Ian Abbott

I just spotted what I think is a bug in "src/thread/pthread/SDL_sysmutex.c" in the SDL_TryLockMutex function when FAKE_RECURSIVE_MUTEX is defined (for an implementation of Pthreads with no recursive mutex support). It calls pthread_mutex_lock instead of pthread_mutex_trylock, so it will block until the mutex is available instead of returning SDL_MUTEX_TIMEDOUT if it cannot lock the mutex immediately.

Fri, 11 Aug 2017 21:30:06 -0700Fixed bug 3284 - minor correction for SDL_setenv on _WIN32__ platform
Sam Lantinga <slouken@libsdl.org> [Fri, 11 Aug 2017 21:30:06 -0700] rev 11232
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. */
}
}

Fri, 11 Aug 2017 21:17:10 -0700Forgot to add function check for fopen64 to CMake build
Sam Lantinga <slouken@libsdl.org> [Fri, 11 Aug 2017 21:17:10 -0700] rev 11231
Forgot to add function check for fopen64 to CMake build

Fri, 11 Aug 2017 21:16:33 -0700Fixed bug 3292 - SDL_rwops and 64-bit file I/O
Sam Lantinga <slouken@libsdl.org> [Fri, 11 Aug 2017 21:16:33 -0700] rev 11230
Fixed bug 3292 - SDL_rwops and 64-bit file I/O

Juha Niemimä

On AmigaOS 4 platform with Newlib 'C' library, there is a problem with failing fseeko64. This seemed to be caused by using fopen instead of fopen64.