From 81259ce05ea2efbdc4077977c26e5089df0d76bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Tue, 27 Aug 2013 12:05:11 +0200 Subject: Save icon for the legacy launcher --- logic/LegacyInstance.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'logic/LegacyInstance.cpp') 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 #include #include @@ -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)); -- cgit v1.2.3