diff --git a/UWPHook/AppEntry.cs b/UWPHook/AppEntry.cs
index 293b105..87a0404 100644
--- a/UWPHook/AppEntry.cs
+++ b/UWPHook/AppEntry.cs
@@ -44,6 +44,21 @@ namespace UWPHook
set { _aumid = value; }
}
+ ///
+ /// Gets or sets the icon for the app
+ ///
+ private string _icon;
+
+ public string Icon
+ {
+ get { return _icon; }
+ set { _icon = value; }
+ }
+
+
+ ///
+ /// Sets the path where icons for the app is
+ ///
private string _icon_path;
public string IconPath
@@ -78,6 +93,8 @@ namespace UWPHook
if (icon != null)
{
+ //UWP apps usually store live tile images inside the same directory
+ //Let's check if the image is square for use as icon on Steam and pick the largest one
if (icon.Width == icon.Height && (icon.Size.Height > size.Height))
{
size = icon.Size;
diff --git a/UWPHook/GamesWindow.xaml.cs b/UWPHook/GamesWindow.xaml.cs
index 7a2bb94..c9e4cfa 100644
--- a/UWPHook/GamesWindow.xaml.cs
+++ b/UWPHook/GamesWindow.xaml.cs
@@ -111,6 +111,13 @@ namespace UWPHook
{
var users = SteamManager.GetUsers(steam_folder);
var selected_apps = Apps.Entries.Where(app => app.Selected);
+
+ //To make things faster, decide icons before looping users
+ foreach (var app in selected_apps)
+ {
+ app.Icon = app.widestSquareIcon();
+ }
+
foreach (var user in users)
{
try
@@ -139,7 +146,7 @@ namespace UWPHook
Exe = @"""" + System.Reflection.Assembly.GetExecutingAssembly().Location + @""" " + app.Aumid,
StartDir = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location),
AllowDesktopConfig = 1,
- Icon = app.widestSquareIcon(),
+ Icon = app.Icon,
Index = shortcuts.Length,
IsHidden = 0,
OpenVR = 0,
@@ -168,7 +175,6 @@ namespace UWPHook
MessageBox.Show("Error exporting your games:" + Environment.NewLine + ex.Message + ex.StackTrace);
}
}
-
}
}