From f41dc7b9c4a110fe5b8435984b9bb20be17bb390 Mon Sep 17 00:00:00 2001 From: terminx Date: Thu, 12 Apr 2018 21:02:18 +0000 Subject: [PATCH] This is supposed to enable the discrete GPU on NVIDIA Optimus and AMD PowerXpress setups git-svn-id: https://svn.eduke32.com/eduke32@6826 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/src/baselayer.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/build/src/baselayer.cpp b/source/build/src/baselayer.cpp index 8b5559676..06bb9823c 100644 --- a/source/build/src/baselayer.cpp +++ b/source/build/src/baselayer.cpp @@ -9,6 +9,14 @@ #include "polymost.h" #include "cache1d.h" +#ifdef _WIN32 +extern "C" +{ + __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 0x00000001; + __declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; +} +#endif // _WIN32 + // input char inputdevices=0; char keystatus[KEYSTATUSSIZ], keyfifo[KEYFIFOSIZ], keyasciififo[KEYFIFOSIZ];