some more fixes
git-svn-id: https://clonekeenplus.svn.sourceforge.net/svnroot/clonekeenplus/cgenius/trunk@157 4df4b0f3-56ce-47cb-b001-ed939b7d65a6
This commit is contained in:
@@ -64,7 +64,7 @@ bool CHQBitmap::loadImage(const std::string& pFilename, int wsize, int hsize)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
SDL_GetError();
|
||||
}
|
||||
|
||||
return m_active;
|
||||
|
||||
@@ -40,10 +40,16 @@ short HQSndDrv_Load(SDL_AudioSpec *AudioSpec, stHQSound *psound, const std::stri
|
||||
g_pLogFile->textOut(PURPLE,"Sorry, OGG-Support is disabled!<br>");
|
||||
buf = "data/hqp/snd/"+ soundfile + ".WAV";
|
||||
|
||||
// Check, if it is a wav file or go back to classic sounds
|
||||
if (SDL_LoadWAV (buf.c_str(), &AudioFileSpec, &(psound->sound_buffer), &(psound->sound_len)) == NULL)
|
||||
std::string fullfname = GetFullFileName(buf);
|
||||
if(fullfname.size() == 0) {
|
||||
g_pLogFile->textOut(PURPLE,"Wave file not found: \"%s\". Trying to load the classical sound<br>", buf.c_str());
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Check, if it is a wav file or go back to classic sounds
|
||||
if (SDL_LoadWAV (Utf8ToSystemNative(fullfname).c_str(), &AudioFileSpec, &(psound->sound_buffer), &(psound->sound_len)) == NULL)
|
||||
{
|
||||
g_pLogFile->textOut(PURPLE,"Wave file could not be opened: \"%s\". Trying to load the classical sound<br>", buf.c_str());
|
||||
g_pLogFile->textOut(PURPLE,"Wave file %s could not be opened: \"%s\". Trying to load the classical sound<br>", buf.c_str(), SDL_GetError());
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -60,7 +66,7 @@ short HQSndDrv_Load(SDL_AudioSpec *AudioSpec, stHQSound *psound, const std::stri
|
||||
// Check, if it is a wav file or go back to classic sounds
|
||||
if (SDL_LoadWAV (Utf8ToSystemNative(fullfname).c_str(), &AudioFileSpec, &(psound->sound_buffer), &(psound->sound_len)) == NULL)
|
||||
{
|
||||
g_pLogFile->textOut(PURPLE,"Wave file could not be opened: \"%s\". Trying to load the classical sounds<br>", buf.c_str());
|
||||
g_pLogFile->ftextOut(PURPLE, "Wave file %s could not be opened: \"%s\". Trying to load the classical sounds<br>", buf.c_str(), SDL_GetError());
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user