mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
Fixed an issue with finding the GreenshotOCRCommand when running inside Visual Studio.
Fixed an issue with running on Windows 7, as it was trying to access a Windows 10 API
This commit is contained in:
parent
4a958be8b5
commit
3ebdf3d2fe
2 changed files with 4 additions and 5 deletions
|
@ -8,4 +8,7 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="CustomMarshalers" />
|
<Reference Include="CustomMarshalers" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<Target Name="PostBuild" BeforeTargets="PostBuildEvent" Condition="'$(BuildingInsideVisualStudio)' == 'true'">
|
||||||
|
<Exec Command="xcopy /q /y /d "$(TargetDir)*.exe" "$(SolutionDir)$(SolutionName)\$(OutDir)"" />
|
||||||
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -2,13 +2,9 @@
|
||||||
using GreenshotPlugin.UnmanagedHelpers;
|
using GreenshotPlugin.UnmanagedHelpers;
|
||||||
using log4net;
|
using log4net;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace GreenshotPlugin.Core
|
namespace GreenshotPlugin.Core
|
||||||
{
|
{
|
||||||
|
@ -28,7 +24,7 @@ namespace GreenshotPlugin.Core
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieve the current DPI for the UI element which is related to this DpiHandler
|
/// Retrieve the current DPI for the UI element which is related to this DpiHandler
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static uint Dpi { get; private set; } = GetDpiForSystem();
|
public static uint Dpi { get; private set; } = WindowsVersion.IsWindows10OrLater ? GetDpiForSystem() : DefaultScreenDpi;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Calculate a DPI scale factor
|
/// Calculate a DPI scale factor
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue