From 91cc228ca259eabfbbb9807a5f1b6f034990aa40 Mon Sep 17 00:00:00 2001 From: Brian Lima Date: Sun, 7 Apr 2024 16:03:29 -0300 Subject: [PATCH] Allow for jpegs and attempt to not mess shortcuts form other apps Co-Authored-By: David Ross Smith <5095074+dragredsim@users.noreply.github.com> --- UWPHook/AppEntry.cs | 4 +++- UWPHook/GamesWindow.xaml.cs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/UWPHook/AppEntry.cs b/UWPHook/AppEntry.cs index 3fe7736..a166b63 100644 --- a/UWPHook/AppEntry.cs +++ b/UWPHook/AppEntry.cs @@ -87,8 +87,10 @@ namespace UWPHook try { - //Get every png in this directory, Steam only allows for .png's + //Get every png, jpg or jpeg in this directory, Steam only allows for .png's but jpgs work too images.AddRange(Directory.GetFiles(_icon_path, "*.png")); + images.AddRange(Directory.GetFiles(_icon_path, "*.jpg")); + images.AddRange(Directory.GetFiles(_icon_path, "*.jpeg")); } catch (DirectoryNotFoundException) { diff --git a/UWPHook/GamesWindow.xaml.cs b/UWPHook/GamesWindow.xaml.cs index bd38575..66e4b26 100644 --- a/UWPHook/GamesWindow.xaml.cs +++ b/UWPHook/GamesWindow.xaml.cs @@ -478,7 +478,7 @@ namespace UWPHook { Log.Verbose(shortcuts[i].ToString()); - if (shortcuts[i].AppName == app.Name) + if (shortcuts[i].AppName == app.Name && shortcuts[i].Exe == exePath) { shortcutAlreadyExists = true; Log.Verbose(app.Name + " already added to Steam. Updating existing shortcut.");