Replaced strncmp for SDL_VIDEODRIVER test with strcasecmp
authorSam Lantinga <slouken@libsdl.org>
Sun, 01 Oct 2006 02:28:41 +0000
changeset 2046da8332c8f480
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
     1.1 --- a/src/video/SDL_video.c	Sun Oct 01 02:06:37 2006 +0000
     1.2 +++ b/src/video/SDL_video.c	Sun Oct 01 02:28:41 2006 +0000
     1.3 @@ -198,8 +198,7 @@
     1.4      }
     1.5      if (driver_name != NULL) {
     1.6          for (i = 0; bootstrap[i]; ++i) {
     1.7 -            if (SDL_strncmp(bootstrap[i]->name, driver_name,
     1.8 -                            SDL_strlen(bootstrap[i]->name)) == 0) {
     1.9 +            if (SDL_strcasecmp(bootstrap[i]->name, driver_name) == 0) {
    1.10                  if (bootstrap[i]->available()) {
    1.11                      video = bootstrap[i]->create(index);
    1.12                  }
     2.1 --- a/src/video/x11/SDL_x11events.c	Sun Oct 01 02:06:37 2006 +0000
     2.2 +++ b/src/video/x11/SDL_x11events.c	Sun Oct 01 02:28:41 2006 +0000
     2.3 @@ -21,6 +21,10 @@
     2.4  */
     2.5  #include "SDL_config.h"
     2.6  
     2.7 +#include <sys/types.h>
     2.8 +#include <sys/time.h>
     2.9 +#include <unistd.h>
    2.10 +
    2.11  #include "SDL_syswm.h"
    2.12  #include "SDL_x11video.h"
    2.13  #include "../../events/SDL_events_c.h"