From 5980f1ac5fdc8ff15e4761ef0123bb3783287b3e Mon Sep 17 00:00:00 2001 From: Konstantin Date: Mon, 30 Jan 2023 23:18:53 +0100 Subject: Better performance of C++ samples on laptops with two graphics cards Untested --- Examples/WhisperDesktop/WhisperDesktop.vcxproj | 6 ++++-- Examples/WhisperDesktop/WhisperDesktop.vcxproj.filters | 3 +++ Examples/WhisperDesktop/useDiscreteGpu.c | 2 ++ Examples/main/main.vcxproj | 1 + Examples/main/main.vcxproj.filters | 1 + 5 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 Examples/WhisperDesktop/useDiscreteGpu.c (limited to 'Examples') 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 @@ + + NotUsing + @@ -128,8 +131,7 @@ - Create - Create + Create 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 @@ Source Files + + Source Files + 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 @@ + 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 @@ + -- cgit v1.2.3