From 990f42683fa9ae55236e68019beed1108992fd52 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Sun, 16 Jan 2011 22:25:39 -0700 Subject: [PATCH] Correct some Sys_FileOpenRead's to be COM_OpenFile --- Quake/snd_codec.c | 17 ++++------------- Quake/snd_codec_wav.c | 2 +- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/Quake/snd_codec.c b/Quake/snd_codec.c index 5d33677f..4a62e4b9 100644 --- a/Quake/snd_codec.c +++ b/Quake/snd_codec.c @@ -60,16 +60,7 @@ Select an appropriate codec for a file based on its extension */ static snd_codec_t *S_FindCodecForFile(const char *filename) { - int i; - char filenameLowercase[MAX_QPATH]; - strncpy(filenameLowercase, filename, MAX_QPATH); - filenameLowercase[MAX_QPATH-1] = '\0'; - for (i=0; iext); // Check it exists int handle; - if (Sys_FileOpenRead(fn, &handle) > 0) + if (COM_OpenFile(fn, &handle) > 0) { COM_CloseFile(handle); return codec; @@ -102,7 +93,7 @@ static snd_codec_t *S_FindCodecForFile(const char *filename) while(codec) { - if(0 == strcmp(ext, codec->ext)) + if(0 == Q_strcasecmp(ext, codec->ext)) return codec; codec = codec->next; } diff --git a/Quake/snd_codec_wav.c b/Quake/snd_codec_wav.c index 55c0dee9..bf782c91 100644 --- a/Quake/snd_codec_wav.c +++ b/Quake/snd_codec_wav.c @@ -204,7 +204,7 @@ void *S_WAV_CodecLoad(const char *filename, snd_info_t *info) void *buffer; // Try to open the file - Sys_FileOpenRead(filename, &file); + COM_OpenFile(filename, &file); if(file == -1) { Con_Printf( "ERROR: Could not open \"%s\"\n",