mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
update sdl to 2.32.6
This commit is contained in:
parent
e557f5962b
commit
ddc1f8c1e2
1339 changed files with 53966 additions and 19207 deletions
|
|
@ -16,6 +16,8 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|||
*/
|
||||
#include "SDL.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef SDL_HAPTIC_DISABLED
|
||||
|
||||
static SDL_Haptic *haptic;
|
||||
|
|
@ -69,7 +71,7 @@ int main(int argc, char **argv)
|
|||
SDL_Log("%d Haptic devices detected.\n", SDL_NumHaptics());
|
||||
if (SDL_NumHaptics() > 0) {
|
||||
/* We'll just use index or the first force feedback device found */
|
||||
if (name == NULL) {
|
||||
if (!name) {
|
||||
i = (index != -1) ? index : 0;
|
||||
}
|
||||
/* Try to find matching device */
|
||||
|
|
@ -88,7 +90,7 @@ int main(int argc, char **argv)
|
|||
}
|
||||
|
||||
haptic = SDL_HapticOpen(i);
|
||||
if (haptic == NULL) {
|
||||
if (!haptic) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to create the haptic device: %s\n",
|
||||
SDL_GetError());
|
||||
return 1;
|
||||
|
|
@ -279,7 +281,7 @@ int main(int argc, char **argv)
|
|||
}
|
||||
|
||||
/* Quit */
|
||||
if (haptic != NULL) {
|
||||
if (haptic) {
|
||||
SDL_HapticClose(haptic);
|
||||
}
|
||||
SDL_Quit();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue