Updated SDL2 to the latest Mercurial revision.

This commit is contained in:
Alex Szpakowski
2015-08-22 14:16:20 -03:00
parent 0753e6b560
commit c47a4b56bb
916 changed files with 16588 additions and 22006 deletions
+13 -1
View File
@@ -1,5 +1,5 @@
/*
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2015 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -56,6 +56,12 @@ loop(void *arg)
while (SDL_PollEvent(&event)) {
switch (event.type) {
case SDL_JOYDEVICEREMOVED:
SDL_Log("Joystick device %d removed.\n", (int) event.jdevice.which);
SDL_Log("Our instance ID is %d\n", (int) SDL_JoystickInstanceID(joystick));
break;
case SDL_JOYAXISMOTION:
SDL_Log("Joystick %d axis %d value: %d\n",
event.jaxis.which,
@@ -169,6 +175,12 @@ loop(void *arg)
done = SDL_TRUE;
retval = SDL_TRUE; /* keep going, wait for reattach. */
}
#ifdef __EMSCRIPTEN__
if (done) {
emscripten_cancel_main_loop();
}
#endif
}
static SDL_bool