summaryrefslogtreecommitdiffstats
path: root/logic/VersionFinal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'logic/VersionFinal.cpp')
-rw-r--r--logic/VersionFinal.cpp28
1 files changed, 27 insertions, 1 deletions
diff --git a/logic/VersionFinal.cpp b/logic/VersionFinal.cpp
index d0e85c15..b465df68 100644
--- a/logic/VersionFinal.cpp
+++ b/logic/VersionFinal.cpp
@@ -310,9 +310,35 @@ void VersionFinal::reapply(const bool alreadyReseting)
file->applyTo(this);
}
versionFiles.swap(newVersionFiles);
-
+ finalize();
if (!alreadyReseting)
{
endResetModel();
}
}
+
+void VersionFinal::finalize()
+{
+ if (assets.isEmpty())
+ {
+ assets = "legacy";
+ }
+ if (minecraftArguments.isEmpty())
+ {
+ QString toCompare = processArguments.toLower();
+ if (toCompare == "legacy")
+ {
+ minecraftArguments = " ${auth_player_name} ${auth_session}";
+ }
+ else if (toCompare == "username_session")
+ {
+ minecraftArguments = "--username ${auth_player_name} --session ${auth_session}";
+ }
+ else if (toCompare == "username_session_version")
+ {
+ minecraftArguments = "--username ${auth_player_name} "
+ "--session ${auth_session} "
+ "--version ${profile_name}";
+ }
+ }
+}