Mercurial > sdl-ios-xcode
comparison src/audio/SDL_audio.c @ 2045:510892a215a2
Replaced strncmp for SDL_AUDIODRIVER test with strcasecmp.
Fixes Bugzilla #334.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sun, 01 Oct 2006 02:06:37 +0000 |
parents | 7a3889fc9e5d |
children | 5f6550e5184f 3a64f57eb3cf |
comparison
equal
deleted
inserted
replaced
2044:8d5d119b1640 | 2045:510892a215a2 |
---|---|
369 /* Ahem, we know that if ESPEAKER is set, user probably wants | 369 /* Ahem, we know that if ESPEAKER is set, user probably wants |
370 to use ESD, but don't start it if it's not already running. | 370 to use ESD, but don't start it if it's not already running. |
371 This probably isn't the place to do this, but... Shh! :) | 371 This probably isn't the place to do this, but... Shh! :) |
372 */ | 372 */ |
373 for (i = 0; bootstrap[i]; ++i) { | 373 for (i = 0; bootstrap[i]; ++i) { |
374 if (SDL_strcmp(bootstrap[i]->name, "esd") == 0) { | 374 if (SDL_strcasecmp(bootstrap[i]->name, "esd") == 0) { |
375 #ifdef HAVE_PUTENV | 375 #ifdef HAVE_PUTENV |
376 const char *esd_no_spawn; | 376 const char *esd_no_spawn; |
377 | 377 |
378 /* Don't start ESD if it's not running */ | 378 /* Don't start ESD if it's not running */ |
379 esd_no_spawn = getenv("ESD_NO_SPAWN"); | 379 esd_no_spawn = getenv("ESD_NO_SPAWN"); |
395 } | 395 } |
396 #endif /* SDL_AUDIO_DRIVER_ESD */ | 396 #endif /* SDL_AUDIO_DRIVER_ESD */ |
397 if (audio == NULL) { | 397 if (audio == NULL) { |
398 if (driver_name != NULL) { | 398 if (driver_name != NULL) { |
399 for (i = 0; bootstrap[i]; ++i) { | 399 for (i = 0; bootstrap[i]; ++i) { |
400 if (SDL_strncmp(bootstrap[i]->name, driver_name, | 400 if (SDL_strcasecmp(bootstrap[i]->name, driver_name) == 0) { |
401 SDL_strlen(bootstrap[i]->name)) == 0) { | |
402 if (bootstrap[i]->available()) { | 401 if (bootstrap[i]->available()) { |
403 audio = bootstrap[i]->create(idx); | 402 audio = bootstrap[i]->create(idx); |
404 } | 403 } |
405 break; | 404 break; |
406 } | 405 } |