From 19109e2d01d7bcbde51ba84f71fee1cfc751ec24 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Sat, 4 Oct 2014 15:12:15 -0400 Subject: Migrate global init stuff into UICommon. This avoids code duplication in a bunch of places . I also moved the NVIDIA Optimus export into VideoCommon. --- Source/Core/VideoCommon/VideoBackendBase.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Source/Core/VideoCommon/VideoBackendBase.cpp') 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() -- cgit v1.2.3