mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
[Settings] Add Image Resizer Settings hyperlink on feature detection of older OS Versions (#2868)
* Added the settings hyperlink code back
* Moved the os detection code to a different file so that it can be imported by image resizer
* Added code to the Image resizer project to react to import the dll
* Added an empty dll project
* Added a dll which can be imported by image resizer
* ImageResizer binding works
* Added the setDllDirectory to load the os-detection dll
* Removed the OS detection files that has been added to the common project
* Added reference to os-detect and removed reference to common/OS-Detection.h
* Modified project files
* Revert "Modified project files"
This reverts commit 75f9d73f30.
* Removed unnecessary showAdvanced bool variables
* Removed OS Detection code from common project
* Cleaned configuration properties of soln and projects
* runner is dependent on os-detection
* Added the os-detection.dll to wxs file
* nit space formatting
* Added reference to os-detection
* Added os-detection header file
* Add os-detection reference
* Added os-detection.dll
* removed the set dll directory and using relative paths instead
* Add relative path
This commit is contained in:
19
src/common/os-detection/dllmain.cpp
Normal file
19
src/common/os-detection/dllmain.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
// dllmain.cpp : Defines the entry point for the DLL application.
|
||||
#include "pch.h"
|
||||
|
||||
BOOL APIENTRY DllMain( HMODULE hModule,
|
||||
DWORD ul_reason_for_call,
|
||||
LPVOID lpReserved
|
||||
)
|
||||
{
|
||||
switch (ul_reason_for_call)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
case DLL_THREAD_ATTACH:
|
||||
case DLL_THREAD_DETACH:
|
||||
case DLL_PROCESS_DETACH:
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
5
src/common/os-detection/framework.h
Normal file
5
src/common/os-detection/framework.h
Normal file
@@ -0,0 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
// Windows Header Files
|
||||
#include <windows.h>
|
||||
38
src/common/os-detection/os-detect.cpp
Normal file
38
src/common/os-detection/os-detect.cpp
Normal file
@@ -0,0 +1,38 @@
|
||||
#include "pch.h"
|
||||
#include "os-detect.h"
|
||||
|
||||
#include <winrt/Windows.Foundation.Metadata.h>
|
||||
|
||||
// The following three helper functions determine if the user has a build version higher than or equal to 19h1, as that is a requirement for xaml islands
|
||||
// Source : Microsoft-ui-xaml github
|
||||
// Link: https://github.com/microsoft/microsoft-ui-xaml/blob/c045cde57c5c754683d674634a0baccda34d58c4/dev/dll/SharedHelpers.cpp
|
||||
template<uint16_t APIVersion>
|
||||
bool IsAPIContractVxAvailable()
|
||||
{
|
||||
static bool isAPIContractVxAvailableInitialized = false;
|
||||
static bool isAPIContractVxAvailable = false;
|
||||
if (!isAPIContractVxAvailableInitialized)
|
||||
{
|
||||
isAPIContractVxAvailableInitialized = true;
|
||||
isAPIContractVxAvailable = winrt::Windows::Foundation::Metadata::ApiInformation::IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", APIVersion);
|
||||
}
|
||||
|
||||
return isAPIContractVxAvailable;
|
||||
}
|
||||
|
||||
bool IsAPIContractV8Available()
|
||||
{
|
||||
return IsAPIContractVxAvailable<8>();
|
||||
}
|
||||
|
||||
bool Is19H1OrHigher()
|
||||
{
|
||||
return IsAPIContractV8Available();
|
||||
}
|
||||
|
||||
// This function returns true if the build is 19h1 or higher, so that we deploy the new settings.
|
||||
// It returns false otherwise.
|
||||
bool UseNewSettings()
|
||||
{
|
||||
return Is19H1OrHigher();
|
||||
}
|
||||
3
src/common/os-detection/os-detect.h
Normal file
3
src/common/os-detection/os-detect.h
Normal file
@@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
extern "C" __declspec(dllexport) bool UseNewSettings();
|
||||
100
src/common/os-detection/os-detection.vcxproj
Normal file
100
src/common/os-detection/os-detection.vcxproj
Normal file
@@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<ProjectGuid>{E6410BFC-B341-498C-8C67-312C20CDD8D5}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>osdetection</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;OSDETECTION_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;OSDETECTION_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="framework.h" />
|
||||
<ClInclude Include="os-detect.h" />
|
||||
<ClInclude Include="pch.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="dllmain.cpp" />
|
||||
<ClCompile Include="os-detect.cpp" />
|
||||
<ClCompile Include="pch.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
39
src/common/os-detection/os-detection.vcxproj.filters
Normal file
39
src/common/os-detection/os-detection.vcxproj.filters
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="framework.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="pch.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="os-detect.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="dllmain.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="pch.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="os-detect.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
6
src/common/os-detection/pch.cpp
Normal file
6
src/common/os-detection/pch.cpp
Normal file
@@ -0,0 +1,6 @@
|
||||
// pch.cpp: source file corresponding to the pre-compiled header
|
||||
|
||||
#include "pch.h"
|
||||
#pragma comment(lib, "windowsapp")
|
||||
|
||||
// When you are using pre-compiled headers, this source file is necessary for compilation to succeed.
|
||||
13
src/common/os-detection/pch.h
Normal file
13
src/common/os-detection/pch.h
Normal file
@@ -0,0 +1,13 @@
|
||||
// pch.h: This is a precompiled header file.
|
||||
// Files listed below are compiled only once, improving build performance for future builds.
|
||||
// This also affects IntelliSense performance, including code completion and many code browsing features.
|
||||
// However, files listed here are ALL re-compiled if any one of them is updated between builds.
|
||||
// Do not add files here that you will be updating frequently as this negates the performance advantage.
|
||||
|
||||
#ifndef PCH_H
|
||||
#define PCH_H
|
||||
|
||||
// add headers that you want to pre-compile here
|
||||
#include "framework.h"
|
||||
|
||||
#endif //PCH_H
|
||||
@@ -98,6 +98,7 @@
|
||||
<Compile Include="Extensions\BitmapEncoderExtensions.cs" />
|
||||
<Compile Include="Extensions\ICollectionExtensions.cs" />
|
||||
<Compile Include="Extensions\TimeSpanExtensions.cs" />
|
||||
<Compile Include="Models\AdvancedSettings.cs" />
|
||||
<Compile Include="Models\ResizeError.cs" />
|
||||
<Compile Include="Properties\Settings.cs" />
|
||||
<Compile Include="Models\CustomSize.cs" />
|
||||
|
||||
13
src/modules/imageresizer/ui/Models/AdvancedSettings.cs
Normal file
13
src/modules/imageresizer/ui/Models/AdvancedSettings.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
// This class sets the visibility property of Advanced settings based on the OS Version
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ImageResizer.Models
|
||||
{
|
||||
public class AdvancedSettings
|
||||
{
|
||||
[DllImport("../os-detection.dll", EntryPoint = "UseNewSettings", ExactSpelling = false)]
|
||||
public static extern bool UseNewSettings();
|
||||
}
|
||||
}
|
||||
@@ -33,8 +33,13 @@ namespace ImageResizer.ViewModels
|
||||
|
||||
ResizeCommand = new RelayCommand(Resize);
|
||||
CancelCommand = new RelayCommand(Cancel);
|
||||
ShowAdvancedCommand = new RelayCommand(ShowAdvanced);
|
||||
|
||||
ShowAdvancedSettings = !AdvancedSettings.UseNewSettings();
|
||||
}
|
||||
|
||||
public bool ShowAdvancedSettings { get; }
|
||||
|
||||
public Settings Settings { get; }
|
||||
|
||||
public ICommand ResizeCommand { get; }
|
||||
@@ -51,5 +56,8 @@ namespace ImageResizer.ViewModels
|
||||
|
||||
public void Cancel()
|
||||
=> _mainView.Close();
|
||||
|
||||
public void ShowAdvanced()
|
||||
=> _mainView.ShowAdvanced(new AdvancedViewModel(Settings));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,8 @@ namespace ImageResizer.Views
|
||||
{
|
||||
void Close();
|
||||
|
||||
void ShowAdvanced(AdvancedViewModel viewModel);
|
||||
|
||||
IEnumerable<string> OpenPictureFiles();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,13 +130,14 @@
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<!--
|
||||
<TextBlock VerticalAlignment="Center">
|
||||
|
||||
<TextBlock VerticalAlignment="Center"
|
||||
Visibility="{Binding ShowAdvancedSettings, Converter={StaticResource BoolValueConverter}}">
|
||||
<Hyperlink Command="{Binding ShowAdvancedCommand}">
|
||||
<Run Text="{x:Static p:Resources.Input_ShowAdvanced}"/>
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
-->
|
||||
|
||||
<Button Grid.Column="1"
|
||||
Height="23"
|
||||
MinWidth="75"
|
||||
|
||||
@@ -39,10 +39,9 @@ namespace ImageResizer.Views
|
||||
return openFileDialog.FileNames;
|
||||
}
|
||||
|
||||
/*
|
||||
public void ShowAdvanced(AdvancedViewModel viewModel)
|
||||
=> viewModel.Close(new AdvancedWindow(viewModel).ShowDialog() == true);
|
||||
*/
|
||||
|
||||
void IMainView.Close()
|
||||
=> Dispatcher.Invoke((Action)Close);
|
||||
}
|
||||
|
||||
@@ -29,5 +29,4 @@
|
||||
#include <winrt/Windows.ApplicationModel.h>
|
||||
#include <winrt/Windows.Storage.h>
|
||||
|
||||
#include <winrt/Windows.Foundation.Metadata.h>
|
||||
#include <wil/resource.h>
|
||||
@@ -62,7 +62,7 @@
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalIncludeDirectories>..\common\inc;..\common\Telemetry;..;..\modules;..\..\deps\cpprestsdk\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\common\inc;..\common\os-detection;..\common\Telemetry;..;..\modules;..\..\deps\cpprestsdk\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalOptions>/await %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
@@ -86,7 +86,7 @@
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalIncludeDirectories>..\common\inc;..\common\Telemetry;..;..\modules;..\..\deps\cpprestsdk\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\common\inc;..\common\os-detection;..\common\Telemetry;..;..\modules;..\..\deps\cpprestsdk\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalOptions>/await %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
@@ -235,6 +235,9 @@
|
||||
<ProjectReference Include="..\common\common.vcxproj">
|
||||
<Project>{74485049-c722-400f-abe5-86ac52d929b3}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\common\os-detection\os-detection.vcxproj">
|
||||
<Project>{e6410bfc-b341-498c-8c67-312c20cdd8d5}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\common\updating\updating.vcxproj">
|
||||
<Project>{17da04df-e393-4397-9cf0-84dabe11032e}</Project>
|
||||
</ProjectReference>
|
||||
@@ -242,7 +245,7 @@
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ItemGroup>
|
||||
<Manifest Include="PowerToys.exe.manifest" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
|
||||
@@ -157,4 +157,7 @@
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Manifest Include="PowerToys.exe.manifest" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
#include <common/json.h>
|
||||
#include <common\settings_helpers.cpp>
|
||||
#include <os-detect.h>
|
||||
|
||||
#define BUFSIZE 1024
|
||||
|
||||
@@ -206,40 +207,6 @@ BOOL run_settings_non_elevated(LPCWSTR executable_path, LPWSTR executable_args,
|
||||
return process_created;
|
||||
}
|
||||
|
||||
// The following three helper functions determine if the user has a build version higher than or equal to 19h1, as that is a requirement for xaml islands
|
||||
// Source : Microsoft-ui-xaml github
|
||||
// Link: https://github.com/microsoft/microsoft-ui-xaml/blob/c045cde57c5c754683d674634a0baccda34d58c4/dev/dll/SharedHelpers.cpp
|
||||
template<uint16_t APIVersion> bool IsAPIContractVxAvailable()
|
||||
{
|
||||
static bool isAPIContractVxAvailableInitialized = false;
|
||||
static bool isAPIContractVxAvailable = false;
|
||||
if (!isAPIContractVxAvailableInitialized)
|
||||
{
|
||||
isAPIContractVxAvailableInitialized = true;
|
||||
isAPIContractVxAvailable = winrt::Windows::Foundation::Metadata::ApiInformation::IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", APIVersion);
|
||||
}
|
||||
|
||||
return isAPIContractVxAvailable;
|
||||
}
|
||||
|
||||
|
||||
bool IsAPIContractV8Available()
|
||||
{
|
||||
return IsAPIContractVxAvailable<8>();
|
||||
}
|
||||
|
||||
bool Is19H1OrHigher()
|
||||
{
|
||||
return IsAPIContractV8Available();
|
||||
}
|
||||
|
||||
// This function returns true if the build is 19h1 or higher, so that we deploy the new settings.
|
||||
// It returns false otherwise.
|
||||
bool use_new_settings()
|
||||
{
|
||||
return Is19H1OrHigher();
|
||||
}
|
||||
|
||||
|
||||
DWORD g_settings_process_id = 0;
|
||||
|
||||
@@ -258,7 +225,7 @@ void run_settings_window()
|
||||
// Arg 1: executable path.
|
||||
std::wstring executable_path = get_module_folderpath();
|
||||
|
||||
if (use_new_settings())
|
||||
if (UseNewSettings())
|
||||
{
|
||||
executable_path.append(L"\\SettingsUIRunner\\Microsoft.PowerToys.Settings.UI.Runner.exe");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user