瀏覽代碼

tell switchable graphics supported systems that they need to use the beefier GPU

Azaezel 7 年之前
父節點
當前提交
ff2d18cc07
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      Engine/source/main/main.cpp

+ 8 - 0
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