summaryrefslogtreecommitdiffstats
path: root/logic/LegacyInstance.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-08-27 12:05:11 +0200
committerPetr Mrázek <peterix@gmail.com>2013-08-27 12:05:11 +0200
commit81259ce05ea2efbdc4077977c26e5089df0d76bc (patch)
tree24f5e82b2aa4bf7198189231a4f7028df615df14 /logic/LegacyInstance.cpp
parent5573ed52e8b68a54330cfee21b853da53d079078 (diff)
downloadMultiMC-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.cpp7
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));