diff --git a/HeliosPlus/GameLibraries/SteamLibrary.cs b/HeliosPlus/GameLibraries/SteamLibrary.cs index 8200eb6..86bd98d 100644 --- a/HeliosPlus/GameLibraries/SteamLibrary.cs +++ b/HeliosPlus/GameLibraries/SteamLibrary.cs @@ -9,6 +9,7 @@ using Microsoft.Win32; using System.IO; using System.Drawing.IconLib; using System.Security; +using System.Diagnostics; namespace HeliosPlus.GameLibraries { @@ -357,7 +358,7 @@ namespace HeliosPlus.GameLibraries var newAppInfo = new AppInfo(); newAppInfo.Read(appInfoVdfFile); - Console.WriteLine($"{newAppInfo.Apps.Count} apps"); + Debug.WriteLine($"{newAppInfo.Apps.Count} apps"); // Chec through all the apps we've extracted foreach (var app in newAppInfo.Apps) @@ -376,28 +377,28 @@ namespace HeliosPlus.GameLibraries foreach (KVObject data in app.Data) { - //Console.WriteLine($"App: {app.AppID} - Data.Name: {data.Name}"); + //Debug.WriteLine($"App: {app.AppID} - Data.Name: {data.Name}"); if (data.Name == "common") { foreach (KVObject common in data.Children) { - //Console.WriteLine($"App: {app.AppID} - Common {common.Name}: {common.Value}"); + //Debug.WriteLine($"App: {app.AppID} - Common {common.Name}: {common.Value}"); if (common.Name == "name") { - Console.WriteLine($"App: {app.AppID} - Common {common.Name}: {common.Value}"); + Debug.WriteLine($"App: {app.AppID} - Common {common.Name}: {common.Value}"); steamGameAppInfo.GameName = common.Value.ToString(); } else if (common.Name == "clienticon") { - Console.WriteLine($"App: {app.AppID} - Common {common.Name}: {common.Value}"); + Debug.WriteLine($"App: {app.AppID} - Common {common.Name}: {common.Value}"); steamGameAppInfo.GameSteamIconPath = Path.Combine(_steamPath, @"steam", @"games", String.Concat(common.Value, @".ico")); } else if (common.Name == "type") { - Console.WriteLine($"App: {app.AppID} - Common {common.Name}: {common.Value}"); + Debug.WriteLine($"App: {app.AppID} - Common {common.Name}: {common.Value}"); } } } @@ -409,7 +410,7 @@ namespace HeliosPlus.GameLibraries if (config.Name == "installdir") { - Console.WriteLine($"App: {app.AppID} - Config {config.Name}: {config.Value}"); + Debug.WriteLine($"App: {app.AppID} - Config {config.Name}: {config.Value}"); steamGameAppInfo.GameInstallDir = config.Value.ToString(); } else if (config.Name == "launch") @@ -420,7 +421,7 @@ namespace HeliosPlus.GameLibraries { if (launch_num.Name == "executable") { - Console.WriteLine($"App: {app.AppID} - Config - Launch {launch.Name} - {launch_num.Name}: {launch_num.Value}"); + Debug.WriteLine($"App: {app.AppID} - Config - Launch {launch.Name} - {launch_num.Name}: {launch_num.Value}"); steamGameAppInfo.GameExes.Add(launch_num.Value.ToString()); } @@ -439,7 +440,7 @@ namespace HeliosPlus.GameLibraries //we just want to ignore it if we try to add it twice.... } - Console.WriteLine($"App: {app.AppID} - Token: {app.Token}"); + Debug.WriteLine($"App: {app.AppID} - Token: {app.Token}"); } } @@ -463,7 +464,7 @@ namespace HeliosPlus.GameLibraries if (steamLibraryMatch.Success) { string steamLibraryPath = Regex.Unescape(steamLibraryMatch.Groups[1].Value); - Console.WriteLine($"Found steam library: {steamLibraryPath}"); + Debug.WriteLine($"Found steam library: {steamLibraryPath}"); steamLibrariesPaths.Add(steamLibraryPath); } } diff --git a/HeliosPlus/ShortcutItem.cs b/HeliosPlus/ShortcutItem.cs index 2f25cc1..a3f96c1 100644 --- a/HeliosPlus/ShortcutItem.cs +++ b/HeliosPlus/ShortcutItem.cs @@ -213,11 +213,15 @@ namespace HeliosPlus // We now force creation of the bitmap // straight away, so we know it has already been done. - _originalBitmap = ToBitmapFromIcon(_originalIconPath); + + /*if (Category == ShortcutCategory.Application) + _originalBitmap = ToBitmapFromExe(_originalIconPath); + else + _originalBitmap = ToBitmapFromIcon(_originalIconPath);*/ // And we do the same for the Bitmap overlay, but only if the ProfileToUse is set - if (ProfileToUse is ProfileItem) - _shortcutBitmap = ToBitmapOverlay(_originalBitmap, ProfileToUse.ProfileTightestBitmap, 256, 256); + //if (ProfileToUse is ProfileItem) + // _shortcutBitmap = ToBitmapOverlay(_originalBitmap, ProfileToUse.ProfileTightestBitmap, 256, 256); } } @@ -233,7 +237,12 @@ namespace HeliosPlus if (String.IsNullOrEmpty(OriginalIconPath)) return null; - return ToBitmapFromIcon(OriginalIconPath); + if (Category == ShortcutCategory.Application) + _originalBitmap = ToBitmapFromExe(OriginalIconPath); + else + _originalBitmap = ToBitmapFromIcon(OriginalIconPath); + + return _originalBitmap; } } diff --git a/HeliosPlus/UIForms/ShortcutForm.cs b/HeliosPlus/UIForms/ShortcutForm.cs index 0ac9688..dcd1a9b 100644 --- a/HeliosPlus/UIForms/ShortcutForm.cs +++ b/HeliosPlus/UIForms/ShortcutForm.cs @@ -486,7 +486,9 @@ namespace HeliosPlus.UIForms _shortcutToEdit.GameLibrary = SupportedGameLibrary.Uplay; }*/ else if (rb_standalone.Checked) + { _shortcutToEdit.Category = ShortcutCategory.Application; + } // Add the Shortcut to the list of saved Shortcuts so it gets saved for later // but only if it's new... if it is an edit then it will already be in the list.