Replaced strncmp for SDL_VIDEODRIVER test with strcasecmp
authorSam Lantinga <slouken@libsdl.org>
Sun, 01 Oct 2006 02:28:41 +0000
changeset 2046 da8332c8f480
parent 2045 510892a215a2
child 2047 9b7c0ff4977f
child 3780 56c7379e3c15
Replaced strncmp for SDL_VIDEODRIVER test with strcasecmp
src/video/SDL_video.c
src/video/x11/SDL_x11events.c
--- a/src/video/SDL_video.c	Sun Oct 01 02:06:37 2006 +0000
+++ b/src/video/SDL_video.c	Sun Oct 01 02:28:41 2006 +0000
@@ -198,8 +198,7 @@
     }
     if (driver_name != NULL) {
         for (i = 0; bootstrap[i]; ++i) {
-            if (SDL_strncmp(bootstrap[i]->name, driver_name,
-                            SDL_strlen(bootstrap[i]->name)) == 0) {
+            if (SDL_strcasecmp(bootstrap[i]->name, driver_name) == 0) {
                 if (bootstrap[i]->available()) {
                     video = bootstrap[i]->create(index);
                 }
--- a/src/video/x11/SDL_x11events.c	Sun Oct 01 02:06:37 2006 +0000
+++ b/src/video/x11/SDL_x11events.c	Sun Oct 01 02:28:41 2006 +0000
@@ -21,6 +21,10 @@
 */
 #include "SDL_config.h"
 
+#include <sys/types.h>
+#include <sys/time.h>
+#include <unistd.h>
+
 #include "SDL_syswm.h"
 #include "SDL_x11video.h"
 #include "../../events/SDL_events_c.h"