Merge pull request #23461 from hpvb/fix-23400

Properly export the various 'use dGPU' symbols when building with MingW
This commit is contained in:
Rémi Verschelde 2018-11-05 11:30:06 +01:00 committed by GitHub
commit bf28c614b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 5 deletions

View File

@ -58,11 +58,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