add:WinRT墨迹识别
This commit is contained in:
@@ -40,8 +40,7 @@ namespace Ink_Canvas.Helpers
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var tryModern = WinRtInkShapeRecognizer.IsApiAvailable
|
var tryModern = WinRtInkShapeRecognizer.IsApiAvailable && Environment.Is64BitProcess;
|
||||||
&& (Environment.Is64BitProcess || Environment.Is64BitOperatingSystem);
|
|
||||||
|
|
||||||
_isModernSystemAvailable = false;
|
_isModernSystemAvailable = false;
|
||||||
if (tryModern)
|
if (tryModern)
|
||||||
|
|||||||
@@ -17,14 +17,13 @@ namespace Ink_Canvas.Helpers
|
|||||||
public static class ShapeRecognitionRouter
|
public static class ShapeRecognitionRouter
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 自动模式:在 64 位 Windows 上优先 WinRT(即使当前进程因 Prefer32Bit 以 WOW64 运行);
|
/// 自动模式:按当前进程位数选择——<c>64</c> 位进程用 WinRT,<c>32</c> 位进程(含 x86 目标在 WOW64 下运行)用 IACore。
|
||||||
/// 32 位系统上走 IACore。与「仅看进程是否 64 位」相比,更符合用户在 x64 系统上的预期。
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool ResolveUseWinRt(ShapeRecognitionEngineMode mode)
|
public static bool ResolveUseWinRt(ShapeRecognitionEngineMode mode)
|
||||||
{
|
{
|
||||||
if (mode == ShapeRecognitionEngineMode.WinRT) return true;
|
if (mode == ShapeRecognitionEngineMode.WinRT) return true;
|
||||||
if (mode == ShapeRecognitionEngineMode.IACore) return false;
|
if (mode == ShapeRecognitionEngineMode.IACore) return false;
|
||||||
return Environment.Is64BitOperatingSystem;
|
return Environment.Is64BitProcess;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool ShouldRunShapeRecognition(bool inkToShapeEnabled, ShapeRecognitionEngineMode mode)
|
public static bool ShouldRunShapeRecognition(bool inkToShapeEnabled, ShapeRecognitionEngineMode mode)
|
||||||
|
|||||||
@@ -36,8 +36,8 @@
|
|||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x86 Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x86 Debug|AnyCPU'">
|
||||||
<DebugType>embedded</DebugType>
|
<DebugType>embedded</DebugType>
|
||||||
<OutputPath>bin\$(Configuration)\</OutputPath>
|
<OutputPath>bin\$(Configuration)\</OutputPath>
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>true</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<DebugType>embedded</DebugType>
|
<DebugType>embedded</DebugType>
|
||||||
|
|||||||
Reference in New Issue
Block a user