Mercurial > sdl-ios-xcode
changeset 2046:da8332c8f480
Replaced strncmp for SDL_VIDEODRIVER test with strcasecmp
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 01 Oct 2006 02:28:41 +0000 |
parents | 510892a215a2 |
children | 9b7c0ff4977f 56c7379e3c15 |
files | src/video/SDL_video.c src/video/x11/SDL_x11events.c |
diffstat | 2 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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"