- bugfix to check main game data folder for videos

This commit is contained in:
Mark Vejvoda 2012-06-01 04:11:31 +00:00
parent 3f604ae359
commit 076a2a5218
1 changed files with 32 additions and 0 deletions

View File

@ -423,6 +423,22 @@ void CoreData::load() {
break;
}
}
if(introVideoFilename == "") {
introVideoPath = data_path + "data/core/menu/videos/intro.*";
introVideos.clear();
findAll(introVideoPath, introVideos, false, false);
for(int i = 0; i < introVideos.size(); ++i) {
string video = data_path + "data/core/menu/videos/" + introVideos[i];
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Checking if intro video [%s] exists\n",video.c_str());
if(fileExists(video)) {
introVideoFilename = video;
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("FOUND intro video [%s] will use this file\n",video.c_str());
break;
}
}
}
}
mainMenuVideoFilename = config.getString("MainMenuVideoURL","");
@ -441,6 +457,22 @@ void CoreData::load() {
break;
}
}
if(mainMenuVideoFilename == "") {
mainVideoPath = data_path + "data/core/menu/videos/main.*";
mainVideos.clear();
findAll(mainVideoPath, mainVideos, false, false);
for(int i = 0; i < mainVideos.size(); ++i) {
string video = data_path + "data/core/menu/videos/" + mainVideos[i];
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Checking if intro video [%s] exists\n",video.c_str());
if(fileExists(video)) {
mainMenuVideoFilename = video;
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("FOUND intro video [%s] will use this file\n",video.c_str());
break;
}
}
}
}
}
}