Mercurial > sdl-ios-xcode
comparison src/audio/SDL_audio.c @ 3881:c1b6bb5205f1 SDL-1.2
1.2 backport: Replaced strncmp for SDL_AUDIODRIVER test with strcasecmp.
Fixes Bugzilla #334.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sun, 01 Oct 2006 02:07:09 +0000 |
parents | 5605a9820134 |
children | dba874934f0c |
comparison
equal
deleted
inserted
replaced
3880:74e828c64315 | 3881:c1b6bb5205f1 |
---|---|
348 /* Ahem, we know that if ESPEAKER is set, user probably wants | 348 /* Ahem, we know that if ESPEAKER is set, user probably wants |
349 to use ESD, but don't start it if it's not already running. | 349 to use ESD, but don't start it if it's not already running. |
350 This probably isn't the place to do this, but... Shh! :) | 350 This probably isn't the place to do this, but... Shh! :) |
351 */ | 351 */ |
352 for ( i=0; bootstrap[i]; ++i ) { | 352 for ( i=0; bootstrap[i]; ++i ) { |
353 if ( SDL_strcmp(bootstrap[i]->name, "esd") == 0 ) { | 353 if ( SDL_strcasecmp(bootstrap[i]->name, "esd") == 0 ) { |
354 #ifdef HAVE_PUTENV | 354 #ifdef HAVE_PUTENV |
355 const char *esd_no_spawn; | 355 const char *esd_no_spawn; |
356 | 356 |
357 /* Don't start ESD if it's not running */ | 357 /* Don't start ESD if it's not running */ |
358 esd_no_spawn = getenv("ESD_NO_SPAWN"); | 358 esd_no_spawn = getenv("ESD_NO_SPAWN"); |
379 if ( SDL_strrchr(driver_name, ':') != NULL ) { | 379 if ( SDL_strrchr(driver_name, ':') != NULL ) { |
380 idx = atoi(SDL_strrchr(driver_name, ':')+1); | 380 idx = atoi(SDL_strrchr(driver_name, ':')+1); |
381 } | 381 } |
382 #endif | 382 #endif |
383 for ( i=0; bootstrap[i]; ++i ) { | 383 for ( i=0; bootstrap[i]; ++i ) { |
384 if (SDL_strncmp(bootstrap[i]->name, driver_name, | 384 if (SDL_strcasecmp(bootstrap[i]->name, driver_name) == 0) { |
385 SDL_strlen(bootstrap[i]->name)) == 0) { | |
386 if ( bootstrap[i]->available() ) { | 385 if ( bootstrap[i]->available() ) { |
387 audio=bootstrap[i]->create(idx); | 386 audio=bootstrap[i]->create(idx); |
388 break; | 387 break; |
389 } | 388 } |
390 } | 389 } |