diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/porting.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/porting.cpp b/src/porting.cpp index f78de39ad..caf9e9be3 100644 --- a/src/porting.cpp +++ b/src/porting.cpp @@ -70,6 +70,15 @@ with this program; if not, write to the Free Software Foundation, Inc., #include <cstdarg> #include <cstdio> +#if !defined(SERVER) && defined(_WIN32) +// On Windows export some driver-specific variables to encourage Minetest to be +// executed on the discrete GPU in case of systems with two. Portability is fun. +extern "C" { + __declspec(dllexport) DWORD NvOptimusEnablement = 1; + __declspec(dllexport) DWORD AmdPowerXpressRequestHighPerformance = 1; +} +#endif + namespace porting { |