From 760bdee879d5666f4a4b535f1332a2665554a05a Mon Sep 17 00:00:00 2001 From: Brian Lima Date: Tue, 11 Oct 2016 20:32:58 -0300 Subject: [PATCH] Fixing Forza Apex and VDFTooShort --- UWPHook/GamesWindow.xaml.cs | 10 ++++++++-- UWPHook/Properties/AssemblyInfo.cs | 4 ++-- UWPHook/Resources/GetAUMIDScript.txt | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/UWPHook/GamesWindow.xaml.cs b/UWPHook/GamesWindow.xaml.cs index 6ed5af8..d5a7f33 100644 --- a/UWPHook/GamesWindow.xaml.cs +++ b/UWPHook/GamesWindow.xaml.cs @@ -89,14 +89,18 @@ namespace UWPHook { try { - VDFEntry[] shortcuts; + VDFEntry[] shortcuts = new VDFEntry[0]; try { shortcuts = SteamManager.ReadShortcuts(user); } catch (Exception ex) { - throw new Exception("Error trying to load existing Steam shortcuts." + Environment.NewLine + ex.Message); + //If it's a short VDF, let's just overwrite it + if (ex.GetType() != typeof(VDFTooShortException)) + { + throw new Exception("Error trying to load existing Steam shortcuts." + Environment.NewLine + ex.Message); + } } if (shortcuts != null) @@ -173,6 +177,8 @@ namespace UWPHook //Remove end lines from the String and split both values, I split the appname and the AUMID using | //I hope no apps have that in their name. Ever. var valor = app.Replace("\r\n", "").Split('|'); + + //Frameworks by Microsoft don fill the displayname at all ot have ms-resource as a name instead, this excludes them making the list less bloated if (!String.IsNullOrWhiteSpace(valor[0]) && !valor[0].Contains("ms-resource")) { Application.Current.Dispatcher.BeginInvoke((Action)delegate () diff --git a/UWPHook/Properties/AssemblyInfo.cs b/UWPHook/Properties/AssemblyInfo.cs index 64df132..897a6a0 100644 --- a/UWPHook/Properties/AssemblyInfo.cs +++ b/UWPHook/Properties/AssemblyInfo.cs @@ -51,5 +51,5 @@ using System.Windows; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.1.3.0")] -[assembly: AssemblyFileVersion("2.1.3.0")] +[assembly: AssemblyVersion("2.1.4.0")] +[assembly: AssemblyFileVersion("2.1.4.0")] diff --git a/UWPHook/Resources/GetAUMIDScript.txt b/UWPHook/Resources/GetAUMIDScript.txt index 0f078b9..9be4d36 100644 --- a/UWPHook/Resources/GetAUMIDScript.txt +++ b/UWPHook/Resources/GetAUMIDScript.txt @@ -7,7 +7,7 @@ foreach ($app in $installedapps) foreach ($appx in (Get-AppxPackageManifest $app)) { - $aumidList += $appx.Package.Applications.Application.VisualElements.DisplayName + " | "+ + $aumidList += $appx.Package.Properties.DisplayName + " | "+ $app.packagefamilyname + "!" + $appx.package.applications.application.id + ";" }