Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions QuickLook/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
</startup>
<runtime>
<AppContextSwitchOverrides value="Switch.System.IO.UseLegacyPathHandling=false;Switch.System.IO.BlockLongPaths=false" />
<AppContextSwitchOverrides value="Switch.System.IO.UseLegacyPathHandling=false;Switch.System.IO.BlockLongPaths=false;Switch.System.Windows.DoNotScaleForDpiChanges=false" />
<legacyCorruptedStateExceptionsPolicy enabled="true" />
<legacyUnhandledExceptionPolicy enabled="1" />
</runtime>
</configuration>
</configuration>
11 changes: 0 additions & 11 deletions QuickLook/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
using QuickLook.NativeMethods;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
Expand Down Expand Up @@ -60,16 +59,6 @@ static App()
RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly;
}

// Explicitly set to PerMonitor to avoid being overridden by the system
if (SHCore.SetProcessDpiAwareness(SHCore.PROCESS_DPI_AWARENESS.PROCESS_PER_MONITOR_DPI_AWARE) is uint result)
{
Debug.WriteLine(
result == 0 ?
"DPI Awareness applied successfully" :
$"DPI Awareness manual setup failed. Error Code: {result}"
);
}

// Occurs when the resolution of an assembly fails
AppDomain.CurrentDomain.AssemblyResolve += (_, e) =>
{
Expand Down
33 changes: 0 additions & 33 deletions QuickLook/NativeMethods/SHCore.cs

This file was deleted.

4 changes: 0 additions & 4 deletions QuickLook/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Media;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
Expand Down Expand Up @@ -65,6 +64,3 @@
// 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.*")]

// If .NET Version is higher than 4.6.2 (Not include 4.6.2), use the following line
// [assembly: DisableDpiAwareness]
11 changes: 6 additions & 5 deletions QuickLook/app.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,15 @@

<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<!-- The combination of below two tags have the following effect : 1) Per-Monitor for >= Windows 10 Anniversary Update 2) System < Windows 10 Anniversary Update -->
<!--<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitor</dpiAwareness>-->
<!--<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>-->
<!-- The combination of below two tags have the following effect :
1. Per-Monitor V2 for >= Windows 10 1703
2. System < Windows 10 1703 -->
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>


<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
<!--
<dependency>
Expand All @@ -77,4 +78,4 @@
</dependency>
-->

</assembly>
</assembly>