mirror of
https://github.com/glest/glest-source.git
synced 2025-08-18 06:01:17 +02:00
- bugfix for not finding hud for scenarios with embedded techtree
This commit is contained in:
@@ -521,7 +521,8 @@ void Game::loadHudTexture(const GameSettings *settings)
|
||||
{
|
||||
string factionName = "";
|
||||
string techName = settings->getTech();
|
||||
string scenarioDir =settings->getScenarioDir();
|
||||
string scenarioDir = extractDirectoryPathFromFile(settings->getScenarioDir());
|
||||
//printf("In loadHudTexture, scenarioDir [%s]\n",scenarioDir.c_str());
|
||||
|
||||
for(int i=0; i < settings->getFactionCount(); ++i ) {
|
||||
if(settings->getFactionControl(i) == ctHuman){
|
||||
@@ -529,7 +530,7 @@ void Game::loadHudTexture(const GameSettings *settings)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(factionName != ""){
|
||||
if(factionName != "") {
|
||||
Config &config= Config::getInstance();
|
||||
vector<string> pathList= config.getPathListForType(ptTechs, scenarioDir);
|
||||
for(int idx= 0; idx < pathList.size(); idx++){
|
||||
|
@@ -78,7 +78,7 @@ TextFTGL::TextFTGL(FontTextHandlerType type) : Text(type) {
|
||||
delete ftFont; ftFont = NULL;
|
||||
free((void*)fontFile);
|
||||
fontFile = NULL;
|
||||
throw runtime_error("FTGL: error loading font");
|
||||
throw runtime_error(string("FTGL: error loading font: ") + string(fontFile));
|
||||
}
|
||||
free((void*)fontFile);
|
||||
fontFile = NULL;
|
||||
|
Reference in New Issue
Block a user