diff --git a/GreenshotOCRCommand/GreenshotOCRCommand.csproj b/GreenshotOCRCommand/GreenshotOCRCommand.csproj index b42f8871b..4267325f2 100644 --- a/GreenshotOCRCommand/GreenshotOCRCommand.csproj +++ b/GreenshotOCRCommand/GreenshotOCRCommand.csproj @@ -8,4 +8,7 @@ + + + diff --git a/GreenshotPlugin/Core/DpiHelper.cs b/GreenshotPlugin/Core/DpiHelper.cs index df947bdbb..1ca9024ab 100644 --- a/GreenshotPlugin/Core/DpiHelper.cs +++ b/GreenshotPlugin/Core/DpiHelper.cs @@ -2,13 +2,9 @@ using GreenshotPlugin.UnmanagedHelpers; using log4net; using System; -using System.Collections.Generic; using System.Diagnostics; using System.Drawing; -using System.Linq; using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; namespace GreenshotPlugin.Core { @@ -28,7 +24,7 @@ namespace GreenshotPlugin.Core /// /// Retrieve the current DPI for the UI element which is related to this DpiHandler /// - public static uint Dpi { get; private set; } = GetDpiForSystem(); + public static uint Dpi { get; private set; } = WindowsVersion.IsWindows10OrLater ? GetDpiForSystem() : DefaultScreenDpi; /// /// Calculate a DPI scale factor