diff options
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)); |