From a3f68ffeb991e4df7f5f9d040829443ab9f7256f Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 1 Oct 2006 02:28:41 +0000 Subject: [PATCH] Replaced strncmp for SDL_VIDEODRIVER test with strcasecmp --- src/video/SDL_video.c | 3 +-- src/video/x11/SDL_x11events.c | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index f5cd49060..703f9d269 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -198,8 +198,7 @@ SDL_VideoInit(const char *driver_name, Uint32 flags) } 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); } diff --git a/src/video/x11/SDL_x11events.c b/src/video/x11/SDL_x11events.c index 8561b1755..75b564db8 100644 --- a/src/video/x11/SDL_x11events.c +++ b/src/video/x11/SDL_x11events.c @@ -21,6 +21,10 @@ */ #include "SDL_config.h" +#include +#include +#include + #include "SDL_syswm.h" #include "SDL_x11video.h" #include "../../events/SDL_events_c.h"