mirror of
https://github.com/glfw/glfw.git
synced 2026-09-21 08:39:45 +00:00
Added support for AMD PowerXpress override.
Generalized _GLFW_USE_OPTIMUS_HPG to _GLFW_USE_HYBRID_HPG to reflect the change. Fixes #520.
This commit is contained in:
@@ -57,8 +57,8 @@
|
||||
// Define this to 1 if building as a shared library / dynamic library / DLL
|
||||
#cmakedefine _GLFW_BUILD_DLL
|
||||
|
||||
// Define this to 1 to force use of high-performance GPU on Optimus systems
|
||||
#cmakedefine _GLFW_USE_OPTIMUS_HPG
|
||||
// Define this to 1 to force use of high-performance GPU on hybrid systems
|
||||
#cmakedefine _GLFW_USE_HYBRID_HPG
|
||||
|
||||
// Define this to 1 if the XInput X11 extension is available
|
||||
#cmakedefine _GLFW_HAS_XINPUT
|
||||
|
||||
+11
-4
@@ -31,14 +31,21 @@
|
||||
#include <malloc.h>
|
||||
|
||||
|
||||
#if defined(_GLFW_USE_OPTIMUS_HPG)
|
||||
#if defined(_GLFW_USE_HYBRID_HPG) || defined(_GLFW_USE_OPTIMUS_HPG)
|
||||
|
||||
// Applications exporting this symbol with this value will be automatically
|
||||
// directed to the high-performance GPU on Nvidia Optimus systems
|
||||
// directed to the high-performance GPU on Nvidia Optimus systems with
|
||||
// up-to-date drivers
|
||||
//
|
||||
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
|
||||
__declspec(dllexport) DWORD NvOptimusEnablement = 1;
|
||||
|
||||
#endif // _GLFW_USE_OPTIMUS_HPG
|
||||
// Applications exporting this symbol with this value will be automatically
|
||||
// directed to the high-performance GPU on AMD PowerXpress systems with
|
||||
// up-to-date drivers
|
||||
//
|
||||
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
|
||||
|
||||
#endif // _GLFW_USE_HYBRID_HPG
|
||||
|
||||
#if defined(_GLFW_BUILD_DLL)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user