linux build bug fixed
This commit is contained in:
parent
4c06c6cd1e
commit
0111e20790
1 changed files with 4 additions and 12 deletions
16
AppEnv.cpp
16
AppEnv.cpp
|
@ -45,9 +45,7 @@ QString AppEnv::getGameFolder(bool *ok)
|
|||
#ifdef GTA5SYNC_WIN
|
||||
_putenv(QString("GTAV_FOLDER=" + dir.absolutePath()).toStdString().c_str());
|
||||
#else
|
||||
char* GTAV_FOLDER_char = QString("GTAV_FOLDER=" + dir.absolutePath()).toStdString().c_str();
|
||||
putenv(GTAV_FOLDER_char);
|
||||
delete GTAV_FOLDER_char;
|
||||
setenv("GTAV_FOLDER", dir.absolutePath().toStdString().c_str(), 1);
|
||||
#endif
|
||||
return dir.absolutePath();
|
||||
}
|
||||
|
@ -73,9 +71,7 @@ QString AppEnv::getGameFolder(bool *ok)
|
|||
#ifdef GTA5SYNC_WIN
|
||||
_putenv(QString("GTAV_FOLDER=" + dir.absolutePath()).toStdString().c_str());
|
||||
#else
|
||||
char* GTAV_FOLDER_char = QString("GTAV_FOLDER=" + dir.absolutePath()).toStdString().c_str();
|
||||
putenv(GTAV_FOLDER_char);
|
||||
delete GTAV_FOLDER_char;
|
||||
setenv("GTAV_FOLDER", dir.absolutePath().toStdString().c_str(), 1);
|
||||
#endif
|
||||
return dir.absolutePath();
|
||||
}
|
||||
|
@ -88,9 +84,7 @@ QString AppEnv::getGameFolder(bool *ok)
|
|||
#ifdef GTA5SYNC_WIN
|
||||
_putenv(QString("GTAV_FOLDER=" + dir.absolutePath()).toStdString().c_str());
|
||||
#else
|
||||
char* GTAV_FOLDER_char = QString("GTAV_FOLDER=" + dir.absolutePath()).toStdString().c_str();
|
||||
putenv(GTAV_FOLDER_char);
|
||||
delete GTAV_FOLDER_char;
|
||||
setenv("GTAV_FOLDER", dir.absolutePath().toStdString().c_str(), 1);
|
||||
#endif
|
||||
return dir.absolutePath();
|
||||
}
|
||||
|
@ -109,9 +103,7 @@ bool AppEnv::setGameFolder(QString gameFolder)
|
|||
#ifdef GTA5SYNC_WIN
|
||||
_putenv(QString("GTAV_FOLDER=" + dir.absolutePath()).toStdString().c_str());
|
||||
#else
|
||||
char* GTAV_FOLDER_char = QString("GTAV_FOLDER=" + dir.absolutePath()).toStdString().c_str();
|
||||
putenv(GTAV_FOLDER_char);
|
||||
delete GTAV_FOLDER_char;
|
||||
setenv("GTAV_FOLDER", dir.absolutePath().toStdString().c_str(), 1);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue