use SDL's functions version inplace of libc version

This commit is contained in:
Sylvain authored and Sam Lantinga committed 2021-11-22 08:38:46 -08:00
1 parent 35b7ce1893
commit d31251b014
46 files changed
+114 -124

No files matched your search

+2 -6
View File
@@ -25,10 +25,6 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
/*
* includes
*/
#include <stdlib.h>
#include <string.h> /* strstr */
#include <ctype.h> /* isdigit */
#include "SDL.h"
#ifndef SDL_HAPTIC_DISABLED
@@ -56,7 +52,7 @@ main(int argc, char **argv)
if (argc > 1) {
size_t l;
name = argv[1];
if ((strcmp(name, "--help") == 0) || (strcmp(name, "-h") == 0)) {
if ((SDL_strcmp(name, "--help") == 0) || (SDL_strcmp(name, "-h") == 0)) {
SDL_Log("USAGE: %s [device]\n"
"If device is a two-digit number it'll use it as an index, otherwise\n"
"it'll use it as if it were part of the device's name.\n",
@@ -83,7 +79,7 @@ main(int argc, char **argv)
/* Try to find matching device */
else {
for (i = 0; i < SDL_NumHaptics(); i++) {
if (strstr(SDL_HapticName(i), name) != NULL)
if (SDL_strstr(SDL_HapticName(i), name) != NULL)
break;
}