myQtHelper->getDataPath() removed
This commit is contained in:
@@ -25,7 +25,7 @@ SDLPlayer::SDLPlayer(ConfigFile *c)
|
||||
SDL_Init(SDL_INIT_AUDIO);
|
||||
initAudio();
|
||||
|
||||
myQtHelper = new QtHelper;
|
||||
myAppDataPath = QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str());
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ void SDLPlayer::playSound(string audioString, int playerID) {
|
||||
|
||||
if(audioEnabled && myConfig->readConfigInt("PlaySoundEffects")) {
|
||||
|
||||
QFile myFile(myQtHelper->getDataPath() + "sounds/default/" + QString::fromStdString(audioString)+".wav");
|
||||
QFile myFile(myAppDataPath + "sounds/default/" + QString::fromStdString(audioString)+".wav");
|
||||
|
||||
if(myFile.open(QIODevice::ReadOnly)) {
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#define SDLPLAYER_H
|
||||
|
||||
#include "configfile.h"
|
||||
#include "qthelper.h"
|
||||
|
||||
#if (defined _WIN32) || (defined __APPLE__)
|
||||
#include <SDL_mixer.h>
|
||||
@@ -53,7 +52,7 @@ private:
|
||||
bool audioEnabled;
|
||||
|
||||
ConfigFile *myConfig;
|
||||
QtHelper *myQtHelper;
|
||||
QString myAppDataPath;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user