Skip to content

Commit

Permalink
xrGame: fix sound loading on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleivg committed Nov 6, 2018
1 parent a84d7a3 commit a71821b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/xrGame/script_sound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

CScriptSound::CScriptSound(LPCSTR caSoundName, ESoundTypes sound_type)
{
#ifdef LINUX
while (char* sep = strchr((char *)caSoundName, '\\')) *sep = '/';
#endif
m_bIsNoSound = strstr(Core.Params, "-nosound");
m_caSoundToPlay = caSoundName;
string_path l_caFileName;
Expand All @@ -29,7 +32,7 @@ CScriptSound::CScriptSound(LPCSTR caSoundName, ESoundTypes sound_type)
CScriptSound::~CScriptSound()
{
if (m_sound._feedback())
GEnv.ScriptEngine->script_log(LuaMessageType::Error, "Playing sound is not completed, but is destroying \"%s\"!",
GEnv.ScriptEngine->script_log(LuaMessageType::Error, "Playing sound is not completed, but is destroying \"%s\"!",
m_sound._handle() ? m_sound._handle()->file_name() : "unknown");
m_sound.destroy();
}
Expand Down

0 comments on commit a71821b

Please sign in to comment.