Update to SDL2.0.10

This commit is contained in:
Areloch 2019-08-19 23:30:35 -05:00
parent 600859bd63
commit c932bda8dd
915 changed files with 116675 additions and 21754 deletions

View file

@ -1,5 +1,5 @@
/*
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2019 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
@ -114,6 +114,11 @@ loop(void *arg)
case SDL_CONTROLLERBUTTONDOWN:
case SDL_CONTROLLERBUTTONUP:
SDL_Log("Controller button %s %s\n", SDL_GameControllerGetStringForButton((SDL_GameControllerButton)event.cbutton.button), event.cbutton.state ? "pressed" : "released");
/* First button triggers a 0.5 second full strength rumble */
if (event.type == SDL_CONTROLLERBUTTONDOWN &&
event.cbutton.button == SDL_CONTROLLER_BUTTON_A) {
SDL_GameControllerRumble(gamecontroller, 0xFFFF, 0xFFFF, 500);
}
break;
case SDL_KEYDOWN:
if (event.key.keysym.sym != SDLK_ESCAPE) {