From b3ed3bdb910fe77dc3b1e05478258f693b5d943d Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Tue, 25 Dec 2012 13:51:13 +0100 Subject: [PATCH] Define NvOptimusEnablement to tell the Nvidia driver we need high performance --- Source/Core/DolphinWX/Src/Main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/Core/DolphinWX/Src/Main.cpp b/Source/Core/DolphinWX/Src/Main.cpp index a5b19eca4c..fc3e2c41a7 100644 --- a/Source/Core/DolphinWX/Src/Main.cpp +++ b/Source/Core/DolphinWX/Src/Main.cpp @@ -45,6 +45,15 @@ #include +// Nvidia drivers >= v302 will check if the application exports a global +// variable named NvOptimusEnablement to know if it should run the app in high +// performance graphics mode or using the IGP. +#ifdef WIN32 +extern "C" { + __declspec(dllexport) DWORD NvOptimusEnablement = 1; +} +#endif + // ------------ // Main window