summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2013-10-25 14:49:42 +0200
committerTannin <devnull@localhost>2013-10-25 14:49:42 +0200
commit8c0b309bdee2527fab66b00b34171ef18f5055bf (patch)
tree9e0d4000573046df8ae7e060b665365f71ed74a6 /src/main.cpp
parentbc7c42dbe8dd85a77a2eb8c1d094c77aa5cb7b1f (diff)
- Option to choose edition of the game. Currently only relevant for FO3 because FO3 GOTY is its own app
- applications that aren't in the executables list can again be started from the command line - references to missing categories are now removed from mods - bugfix: integrated fomod installer didn't update description and picture on some constellations of Windows version and theme
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 59a4e837..90cf9e0e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -400,6 +400,27 @@ int main(int argc, char *argv[])
settings.setValue("gamePath", gamePath.toUtf8().constData());
}
+ int edition = 0;
+ if (settings.contains("game_edition")) {
+ edition = settings.value("game_edition").toInt();
+ } else {
+ std::vector<std::wstring> editions = GameInfo::instance().getSteamVariants();
+ if (editions.size() < 2) {
+ edition = 0;
+ } else {
+ SelectionDialog selection(QObject::tr("Please select the game edition you have (MO can't start the game correctly if this is set incorrectly!)"), NULL);
+ int index = 0;
+ for (auto iter = editions.begin(); iter != editions.end(); ++iter) {
+ selection.addChoice(ToQString(*iter), "", index++);
+ }
+ if (selection.exec() == QDialog::Rejected) {
+ return -1;
+ } else {
+ settings.setValue("game_edition", selection.getChoiceData().toInt());
+ }
+ }
+ }
+
qDebug("managing game at %s", qPrintable(QDir::toNativeSeparators(gamePath)));
ExecutablesList executablesList;