Changeset 627
- Timestamp:
- May 9, 2011, 9:21:51 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
abuse/trunk/src/sdlport/sound.cpp
r617 r627 44 44 { 45 45 char *sfxdir, *datadir; 46 FILE *f d= NULL;46 FILE *f = NULL; 47 47 48 48 // Disable sound if requested. … … 56 56 // Check for the sfx directory, disable sound if we can't find it. 57 57 datadir = get_filename_prefix(); 58 sfxdir = (char *)malloc( strlen( datadir ) + 5 + 1 ); 59 sprintf( sfxdir, "%s/sfx/", datadir ); 60 if( (fd = fopen( sfxdir,"r" )) == NULL ) 58 sfxdir = (char *)malloc(strlen(datadir) + 5 + 1); 59 sprintf(sfxdir, "%s/sfx/ambcave1.wav", datadir); 60 FILE *f = fopen(sfxdir, "r"); 61 if (!f) 61 62 { 62 63 // Didn't find the directory, so disable sound. … … 64 65 return 0; 65 66 } 66 free( sfxdir ); 67 fclose(f); 68 free(sfxdir); 67 69 68 70 if (Mix_OpenAudio(44100, AUDIO_S16SYS, 2, 128) < 0)
Note: See TracChangeset
for help on using the changeset viewer.