Răsfoiți Sursa

add high performance gpu runtime detection

Nicolas Cannasse 8 ani în urmă
părinte
comite
453728006c
1 a modificat fișierele cu 5 adăugiri și 0 ștergeri
  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