summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VideoBackendBase.cpp
diff options
context:
space:
mode:
authorAugustin Cavalier <waddlesplash@gmail.com>2014-10-04 15:12:15 -0400
committerAugustin Cavalier <waddlesplash@gmail.com>2014-10-05 20:47:37 -0400
commit19109e2d01d7bcbde51ba84f71fee1cfc751ec24 (patch)
treec2ef739cc452f25bc7ddefc1ad95357fac2f87ca /Source/Core/VideoCommon/VideoBackendBase.cpp
parent669a1180638cc803dae890e2f8616d7c7720780b (diff)
Migrate global init stuff into UICommon.
This avoids code duplication in a bunch of places . I also moved the NVIDIA Optimus export into VideoCommon.
Diffstat (limited to 'Source/Core/VideoCommon/VideoBackendBase.cpp')
-rw-r--r--Source/Core/VideoCommon/VideoBackendBase.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/VideoBackendBase.cpp b/Source/Core/VideoCommon/VideoBackendBase.cpp
index a2d6d19845..817d917114 100644
--- a/Source/Core/VideoCommon/VideoBackendBase.cpp
+++ b/Source/Core/VideoCommon/VideoBackendBase.cpp
@@ -32,6 +32,13 @@ static bool IsGteVista()
return VerifyVersionInfo(&osvi, VER_MAJORVERSION, dwlConditionMask) != FALSE;
}
+
+// 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.
+extern "C" {
+__declspec(dllexport) DWORD NvOptimusEnablement = 1;
+}
#endif
void VideoBackend::PopulateList()