diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-08-27 12:05:11 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-08-27 12:05:11 +0200 |
commit | 81259ce05ea2efbdc4077977c26e5089df0d76bc (patch) | |
tree | 24f5e82b2aa4bf7198189231a4f7028df615df14 /logic/LegacyInstance.cpp | |
parent | 5573ed52e8b68a54330cfee21b853da53d079078 (diff) | |
download | MultiMC-81259ce05ea2efbdc4077977c26e5089df0d76bc.tar MultiMC-81259ce05ea2efbdc4077977c26e5089df0d76bc.tar.gz MultiMC-81259ce05ea2efbdc4077977c26e5089df0d76bc.tar.lz MultiMC-81259ce05ea2efbdc4077977c26e5089df0d76bc.tar.xz MultiMC-81259ce05ea2efbdc4077977c26e5089df0d76bc.zip |
Save icon for the legacy launcher
Diffstat (limited to 'logic/LegacyInstance.cpp')
-rw-r--r-- | logic/LegacyInstance.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/logic/LegacyInstance.cpp b/logic/LegacyInstance.cpp index 3aa3e683..7209793c 100644 --- a/logic/LegacyInstance.cpp +++ b/logic/LegacyInstance.cpp @@ -2,6 +2,7 @@ #include "LegacyInstance_p.h" #include "MinecraftProcess.h" #include "LegacyUpdate.h" +#include "IconListModel.h" #include <setting.h> #include <pathutils.h> #include <cmdutils.h> @@ -31,8 +32,10 @@ MinecraftProcess* LegacyInstance::prepareForLaunch(QString user, QString session { MinecraftProcess * proc = new MinecraftProcess(this); - // FIXME: extract the icon - // QImage(":/icons/instances/" + iconKey()).save(PathCombine(minecraftRoot(), "icon.png")); + IconList * list = IconList::instance(); + QIcon icon = list->getIcon(iconKey()); + auto pixmap = icon.pixmap(128,128); + pixmap.save(PathCombine(minecraftRoot(), "icon.png"),"PNG"); // extract the legacy launcher QFile(":/launcher/launcher.jar").copy(PathCombine(minecraftRoot(), LAUNCHER_FILE)); |