From a84367ef38cd76010faf5f61922be846887e2da9 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Mon, 2 Feb 2015 16:29:58 -0400 Subject: [PATCH] Prefer the higher performance GPU on Windows systems that use nvidia optimus (resolves issue #984.) --- src/love.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/love.cpp b/src/love.cpp index 64e3fed72..3543136d6 100644 --- a/src/love.cpp +++ b/src/love.cpp @@ -39,6 +39,17 @@ extern "C" { #include "OSX.h" #endif // LOVE_MACOSX +#ifdef LOVE_WINDOWS +extern "C" +{ +// Prefer the higher performance GPU on Windows systems that use nvidia Optimus. +// http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf +// TODO: Re-evaluate in the future when the average integrated GPU in Optimus +// systems is less mediocre? +LOVE_EXPORT DWORD NvOptimusEnablement = 0x00000001; +} +#endif + #ifdef LOVE_LEGENDARY_UTF8_ARGV_HACK void get_utf8_arguments(int &argc, char **&argv)