1.2 backport: Replaced strncmp for SDL_AUDIODRIVER test with strcasecmp.

Fixes Bugzilla #334.

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402123
This commit is contained in:
Ryan C. Gordon 2006-10-01 02:07:09 +00:00
parent 64fd559c0d
commit 4ab10dce94

View file

@ -350,7 +350,7 @@ int SDL_AudioInit(const char *driver_name)
This probably isn't the place to do this, but... Shh! :) This probably isn't the place to do this, but... Shh! :)
*/ */
for ( i=0; bootstrap[i]; ++i ) { for ( i=0; bootstrap[i]; ++i ) {
if ( SDL_strcmp(bootstrap[i]->name, "esd") == 0 ) { if ( SDL_strcasecmp(bootstrap[i]->name, "esd") == 0 ) {
#ifdef HAVE_PUTENV #ifdef HAVE_PUTENV
const char *esd_no_spawn; const char *esd_no_spawn;
@ -381,8 +381,7 @@ int SDL_AudioInit(const char *driver_name)
} }
#endif #endif
for ( i=0; bootstrap[i]; ++i ) { for ( i=0; bootstrap[i]; ++i ) {
if (SDL_strncmp(bootstrap[i]->name, driver_name, if (SDL_strcasecmp(bootstrap[i]->name, driver_name) == 0) {
SDL_strlen(bootstrap[i]->name)) == 0) {
if ( bootstrap[i]->available() ) { if ( bootstrap[i]->available() ) {
audio=bootstrap[i]->create(idx); audio=bootstrap[i]->create(idx);
break; break;