Upgrade to SDL2.0.2 (8393682d9d96d1516831a397290cb34ceb82129f).

This commit is contained in:
rude
2014-03-09 10:15:01 +01:00
parent 6b31c2b45e
commit 2fb789ce68
63 changed files with 1450 additions and 1159 deletions
+14 -3
View File
@@ -503,17 +503,28 @@ SDL_GetEventFilter(SDL_EventFilter * filter, void **userdata)
void
SDL_AddEventWatch(SDL_EventFilter filter, void *userdata)
{
SDL_EventWatcher *watcher;
SDL_EventWatcher *watcher, *tail;
watcher = (SDL_EventWatcher *)SDL_malloc(sizeof(*watcher));
if (!watcher) {
/* Uh oh... */
return;
}
/* create the watcher */
watcher->callback = filter;
watcher->userdata = userdata;
watcher->next = SDL_event_watchers;
SDL_event_watchers = watcher;
watcher->next = NULL;
/* add the watcher to the end of the list */
if (SDL_event_watchers) {
for (tail = SDL_event_watchers; tail->next; tail = tail->next) {
continue;
}
tail->next = watcher;
} else {
SDL_event_watchers = watcher;
}
}
/* FIXME: This is not thread-safe yet */
+1 -6
View File
@@ -418,13 +418,8 @@ int SDL_GestureAddTouch(SDL_TouchID touchId)
SDL_gestureTouch = gestureTouch;
SDL_gestureTouch[SDL_numGestureTouches].numDownFingers = 0;
SDL_zero(SDL_gestureTouch[SDL_numGestureTouches]);
SDL_gestureTouch[SDL_numGestureTouches].id = touchId;
SDL_gestureTouch[SDL_numGestureTouches].numDollarTemplates = 0;
SDL_gestureTouch[SDL_numGestureTouches].recording = SDL_FALSE;
SDL_numGestureTouches++;
return 0;
}
+4 -1
View File
@@ -538,7 +538,10 @@ SDL_SetRelativeMouseMode(SDL_bool enabled)
} else if (enabled && ShouldUseRelativeModeWarp(mouse)) {
mouse->relative_mode_warp = SDL_TRUE;
} else if (mouse->SetRelativeMouseMode(enabled) < 0) {
return -1;
if (enabled) {
// Fall back to warp mode if native relative mode failed
mouse->relative_mode_warp = SDL_TRUE;
}
}
mouse->relative_mode = enabled;