diff --git a/src/display/gl/glstate.h b/src/display/gl/glstate.h index 2cf67f9c..02830e6f 100644 --- a/src/display/gl/glstate.h +++ b/src/display/gl/glstate.h @@ -27,15 +27,6 @@ #include #include -// Try to work around buggy GL drivers that tend to be in Optimus laptops -// by forcing MKXP to use the dedicated card instead of the integrated one -#ifdef __WIN32__ -#include -extern "C" { -__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; -} -#endif - struct Config; template diff --git a/src/main.cpp b/src/main.cpp index cbb7e818..e39ad145 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -51,6 +51,13 @@ #include "resource.h" #include #include "util/win-consoleutils.h" + +// Try to work around buggy GL drivers that tend to be in Optimus laptops +// by forcing MKXP to use the dedicated card instead of the integrated one +#include +extern "C" { +__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; +} #endif #ifdef MKXPZ_STEAM