From ff2d18cc076c1734bb92a044805220c7891bf033 Mon Sep 17 00:00:00 2001 From: Azaezel Date: Mon, 26 Feb 2018 20:45:18 -0600 Subject: [PATCH] tell switchable graphics supported systems that they need to use the beefier GPU --- Engine/source/main/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Engine/source/main/main.cpp b/Engine/source/main/main.cpp index f74430fc1..b5fea8a07 100644 --- a/Engine/source/main/main.cpp +++ b/Engine/source/main/main.cpp @@ -283,6 +283,14 @@ int main(int argc, const char **argv) #include "app/mainLoop.h" #include "T3D/gameFunctions.h" +#if defined(WIN32) || defined(_WIN32) //tell switchable graphics supported systems that they need to use the beefier GPU +extern "C" { __declspec(dllexport) unsigned long NvOptimusEnablement = 0x00000001; } +extern "C" { __declspec(dllexport) unsigned long AmdPowerXpressRequestHighPerformance = 0x00000001; } +#else +extern "C" { int NvOptimusEnablement = 1; } +extern "C" { int AmdPowerXpressRequestHighPerformance = 1; } +#endif + // Entry point for your game. // // This is build by default using the "StandardMainLoop" toolkit. Feel free