Commit 80789b6e authored by Thiago Santini's avatar Thiago Santini

Fixes path to sound effects

In case the pwd has changed before loading a sound effect,
we search in paths relative to the executable.
parent 7f730001
......@@ -192,7 +192,7 @@ void loadSoundEffect(QSoundEffect &effect, QString fileName)
// It assumes the build location for the development environment!
QStringList searchPaths;
searchPaths << "../EyeRecToo/effects" << "./effects";
searchPaths << gExeDir + "/../EyeRecToo/effects" << gExeDir + "/effects";
for (int i=0; i<searchPaths.size(); i++) {
QString target = searchPaths[i] + "/" + fileName;
if (QFile(target).exists()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment