summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin <const@const.me>2023-01-30 23:18:53 +0100
committerKonstantin <const@const.me>2023-01-30 23:18:53 +0100
commit5980f1ac5fdc8ff15e4761ef0123bb3783287b3e (patch)
treecbae1c46f37427a863eba3767d072fcab9bc1d3b
parent600cb13f9f4b02d9030f99fc379bdebebb64b65d (diff)
Better performance of C++ samples on laptops with two graphics cards
Untested
-rw-r--r--Examples/WhisperDesktop/WhisperDesktop.vcxproj6
-rw-r--r--Examples/WhisperDesktop/WhisperDesktop.vcxproj.filters3
-rw-r--r--Examples/WhisperDesktop/useDiscreteGpu.c2
-rw-r--r--Examples/main/main.vcxproj1
-rw-r--r--Examples/main/main.vcxproj.filters1
5 files changed, 11 insertions, 2 deletions
diff --git a/Examples/WhisperDesktop/WhisperDesktop.vcxproj b/Examples/WhisperDesktop/WhisperDesktop.vcxproj
index 7f5bce8..88b4914 100644
--- a/Examples/WhisperDesktop/WhisperDesktop.vcxproj
+++ b/Examples/WhisperDesktop/WhisperDesktop.vcxproj
@@ -119,6 +119,9 @@
<ClCompile Include="AppState.cpp" />
<ClCompile Include="CaptureDlg.cpp" />
<ClCompile Include="ModelAdvancedDlg.cpp" />
+ <ClCompile Include="useDiscreteGpu.c">
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ </ClCompile>
<ClCompile Include="Utils\TranslateCheckbox.cpp" />
<ClCompile Include="Utils\DebugConsole.cpp" />
<ClCompile Include="Utils\logger.cpp" />
@@ -128,8 +131,7 @@
<ClCompile Include="TranscribeDlg.cpp" />
<ClCompile Include="Utils\miscUtils.cpp" />
<ClCompile Include="stdafx.cpp">
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
+ <PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="WhisperDesktop.cpp" />
</ItemGroup>
diff --git a/Examples/WhisperDesktop/WhisperDesktop.vcxproj.filters b/Examples/WhisperDesktop/WhisperDesktop.vcxproj.filters
index 7d12f22..65de495 100644
--- a/Examples/WhisperDesktop/WhisperDesktop.vcxproj.filters
+++ b/Examples/WhisperDesktop/WhisperDesktop.vcxproj.filters
@@ -131,6 +131,9 @@
<ClCompile Include="ModelAdvancedDlg.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="useDiscreteGpu.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="WhisperDesktop.rc">
diff --git a/Examples/WhisperDesktop/useDiscreteGpu.c b/Examples/WhisperDesktop/useDiscreteGpu.c
new file mode 100644
index 0000000..09b6e5b
--- /dev/null
+++ b/Examples/WhisperDesktop/useDiscreteGpu.c
@@ -0,0 +1,2 @@
+__declspec( dllexport ) int NvOptimusEnablement = 1;
+__declspec( dllexport ) int AmdPowerXpressRequestHighPerformance = 1; \ No newline at end of file
diff --git a/Examples/main/main.vcxproj b/Examples/main/main.vcxproj
index ba1e191..0c05491 100644
--- a/Examples/main/main.vcxproj
+++ b/Examples/main/main.vcxproj
@@ -74,6 +74,7 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\WhisperDesktop\useDiscreteGpu.c" />
<ClCompile Include="main.cpp" />
<ClCompile Include="miscUtils.cpp" />
<ClCompile Include="params.cpp" />
diff --git a/Examples/main/main.vcxproj.filters b/Examples/main/main.vcxproj.filters
index 2a4739f..45a6b14 100644
--- a/Examples/main/main.vcxproj.filters
+++ b/Examples/main/main.vcxproj.filters
@@ -4,6 +4,7 @@
<ClCompile Include="main.cpp" />
<ClCompile Include="params.cpp" />
<ClCompile Include="miscUtils.cpp" />
+ <ClCompile Include="..\WhisperDesktop\useDiscreteGpu.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="params.h" />