Skip to content

Commit 74d1f49

Browse files
committed
Export NvOptimusEnablement to request the high-performance GPU
1 parent 9483205 commit 74d1f49

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/STDInclude.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@
55

66
extern "C"
77
{
8+
// Enable 'High Performance Graphics'.
9+
//
10+
// Official documentation states that this mechanism is not supported when
11+
// invoked from a DLL. Turn out that in practice, user reports and field
12+
// testing indicate that it does actually take effect and is in fact required
13+
// for hybrid (Optimus) system. We therefore enable it here despite the
14+
// documented limitation.
15+
//
16+
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
17+
818
// Libtommath random-source stubs.
919
//
1020
// The library probes for a small set of platform RNG providers. On Windows

0 commit comments

Comments
 (0)