From 269d4f6765a3edcee4f9cf96c3d6a2330f0d683d Mon Sep 17 00:00:00 2001 From: Tannin Date: Mon, 17 Aug 2015 20:50:47 +0200 Subject: bugfix: wrong app ids used for oblivion and fallout 3 rewrote handling of different game variants: now resides in game plugin and works --- src/main.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 76474fd6..b83fde33 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -496,21 +496,26 @@ int main(int argc, char *argv[]) return 1; } + IPluginGame *game = organizer.managedGame(); + if (!settings.contains("game_edition")) { - std::vector editions = GameInfo::instance().getSteamVariants(); + QStringList editions = game->gameVariants(); if (editions.size() > 1) { SelectionDialog selection(QObject::tr("Please select the game edition you have (MO can't start the game correctly if this is set incorrectly!)"), nullptr); int index = 0; - for (auto iter = editions.begin(); iter != editions.end(); ++iter) { - selection.addChoice(ToQString(*iter), "", index++); + for (const QString &edition : editions) { + selection.addChoice(edition, "", index++); } if (selection.exec() == QDialog::Rejected) { return -1; } else { - settings.setValue("game_edition", selection.getChoiceData().toInt()); + settings.setValue("game_edition", selection.getChoiceString()); } } } + game->setGameVariant(settings.value("game_edition").toString()); + + #pragma message("edition isn't used?") qDebug("managing game at %s", qPrintable(QDir::toNativeSeparators(gamePath))); -- cgit v1.3.1