Fixing non valid icons for Steam

UWPTest 2.2.1
Brian Lima 8 years ago
parent a000503f63
commit ba6a489b32

@ -5,10 +5,6 @@ VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UWPHook", "UWPHook\UWPHook.csproj", "{AFE09BCF-28A4-48EE-876B-FEF080D04D5F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpSteam", "..\..\Visual Studio 2015\Projects\SharpSteam\SharpSteam\SharpSteam.csproj", "{D0A686FB-B373-4FBC-A0DD-C3417276A816}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VDFParser", "..\..\Visual Studio 2015\Projects\SharpSteam\VDFParser\VDFParser\VDFParser.csproj", "{9543FB59-1EB6-4638-B24C-B12B9D4A15FC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -19,14 +15,6 @@ Global
{AFE09BCF-28A4-48EE-876B-FEF080D04D5F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AFE09BCF-28A4-48EE-876B-FEF080D04D5F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AFE09BCF-28A4-48EE-876B-FEF080D04D5F}.Release|Any CPU.Build.0 = Release|Any CPU
{D0A686FB-B373-4FBC-A0DD-C3417276A816}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D0A686FB-B373-4FBC-A0DD-C3417276A816}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D0A686FB-B373-4FBC-A0DD-C3417276A816}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D0A686FB-B373-4FBC-A0DD-C3417276A816}.Release|Any CPU.Build.0 = Release|Any CPU
{9543FB59-1EB6-4638-B24C-B12B9D4A15FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9543FB59-1EB6-4638-B24C-B12B9D4A15FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9543FB59-1EB6-4638-B24C-B12B9D4A15FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9543FB59-1EB6-4638-B24C-B12B9D4A15FC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

@ -64,12 +64,25 @@ namespace UWPHook
//Decide which is the largest
foreach (string image in images)
{
Image i = Image.FromFile(image);
Image icon = null;
if (i.Width == i.Height && (i.Size.Height > size.Height))
//Try to load the image, if it's a invalid file, skip it
try
{
size = i.Size;
result = image;
icon = Image.FromFile(image);
}
catch (System.Exception)
{
}
if (icon != null)
{
if (icon.Width == icon.Height && (icon.Size.Height > size.Height))
{
size = icon.Size;
result = image;
}
}
}

@ -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.2.0.0")]
[assembly: AssemblyFileVersion("2.2.0.0")]
[assembly: AssemblyVersion("2.2.1.0")]
[assembly: AssemblyFileVersion("2.2.1.0")]

@ -64,6 +64,9 @@
<HintPath>..\packages\MaterialDesignThemes.2.1.0.657\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SharpSteam">
<HintPath>..\..\SharpSteam\SharpSteam\bin\Release\SharpSteam.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
@ -80,6 +83,9 @@
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="VDFParser">
<HintPath>..\..\SharpSteam\SharpSteam\bin\Release\VDFParser.dll</HintPath>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
@ -178,16 +184,6 @@
<ItemGroup>
<Resource Include="Resources\hook2.ico" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Visual Studio 2015\Projects\SharpSteam\SharpSteam\SharpSteam.csproj">
<Project>{d0a686fb-b373-4fbc-a0dd-c3417276a816}</Project>
<Name>SharpSteam</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\Visual Studio 2015\Projects\SharpSteam\VDFParser\VDFParser\VDFParser.csproj">
<Project>{9543fb59-1eb6-4638-b24c-b12b9d4a15fc}</Project>
<Name>VDFParser</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

Loading…
Cancel
Save