Properly export the various 'use dGPU' symbols when building with MingW
This fixes exporting the NvOptimusEnablement export when building with
MingW. This also adds the equivalent for AMD.
This fixes #23400
(cherry picked from commit 19d91f788d
)
This commit is contained in:
parent
96ed1801aa
commit
3f5d9074e4
|
@ -57,11 +57,8 @@
|
||||||
static const WORD MAX_CONSOLE_LINES = 1500;
|
static const WORD MAX_CONSOLE_LINES = 1500;
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#ifdef _MSC_VER
|
__declspec(dllexport) DWORD NvOptimusEnablement = 1;
|
||||||
_declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
|
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
|
||||||
#else
|
|
||||||
__attribute__((visibility("default"))) DWORD NvOptimusEnablement = 0x00000001;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Workaround mingw-w64 < 4.0 bug
|
// Workaround mingw-w64 < 4.0 bug
|
||||||
|
|
Loading…
Reference in New Issue