浏览代码

add high performance gpu runtime detection

Nicolas Cannasse 8 年之前
父节点
当前提交
453728006c
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/main.c

+ 5 - 0
src/main.c

@@ -84,6 +84,11 @@ static int throw_handler( int code ) {
 	}
 	return EXCEPTION_CONTINUE_SEARCH;
 }
+
+// this allows some runtime detection to switch to high performance mode
+__declspec(dllexport) DWORD NvOptimusEnablement = 1;
+__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
+
 #endif
 
 #ifdef HL_WIN