mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
+1
-1
@@ -100,7 +100,7 @@ struct _loot_db_int : public loot::Game {
|
||||
extStringArraySize(0),
|
||||
extRevisionID(nullptr),
|
||||
extRevisionDate(nullptr) {
|
||||
this->SetDetails("", "", "", "", gamePath, "").Init();
|
||||
this->SetDetails("", "", "", "", gamePath, "").Init(false);
|
||||
}
|
||||
|
||||
~_loot_db_int() {
|
||||
|
||||
@@ -352,7 +352,7 @@ namespace loot {
|
||||
return *this;
|
||||
}
|
||||
|
||||
Game& Game::Init() {
|
||||
Game& Game::Init(bool createFolder) {
|
||||
if (id != Game::tes4 && id != Game::tes5 && id != Game::fo3 && id != Game::fonv) {
|
||||
throw error(error::invalid_args, lc::translate("Invalid game ID supplied.").str());
|
||||
}
|
||||
@@ -382,7 +382,10 @@ namespace loot {
|
||||
}
|
||||
|
||||
RefreshActivePluginsList();
|
||||
CreateLOOTGameFolder();
|
||||
|
||||
if (createFolder) {
|
||||
CreateLOOTGameFolder();
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
+1
-1
@@ -108,7 +108,7 @@ namespace loot {
|
||||
Game& SetDetails(const std::string& name, const std::string& masterFile,
|
||||
const std::string& repositoryURL, const std::string& repositoryBranch,
|
||||
const std::string& path, const std::string& registry);
|
||||
Game& Init();
|
||||
Game& Init(bool createFolder);
|
||||
|
||||
bool IsInstalled() const;
|
||||
|
||||
|
||||
+2
-2
@@ -228,7 +228,7 @@ namespace loot {
|
||||
BOOST_LOG_TRIVIAL(debug) << "Selecting game.";
|
||||
_currentGame = SelectGame(_settings, _games, cmdLineGame);
|
||||
BOOST_LOG_TRIVIAL(debug) << "Initialising game-specific settings.";
|
||||
_games[_currentGame].Init();
|
||||
_games[_currentGame].Init(true);
|
||||
}
|
||||
catch (loot::error &e) {
|
||||
if (e.code() == loot::error::no_game_detected) {
|
||||
@@ -291,7 +291,7 @@ namespace loot {
|
||||
auto it = find(_games.begin(), _games.end(), newGameFolder);
|
||||
|
||||
_currentGame = std::distance(_games.begin(), it);
|
||||
_games[_currentGame].Init();
|
||||
_games[_currentGame].Init(true);
|
||||
BOOST_LOG_TRIVIAL(debug) << "New game is " << _games[_currentGame].Name();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user