summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHein-Pieter van Braam <hp@tmm.cx>2018-11-02 23:10:44 +0100
committerHein-Pieter van Braam <hp@tmm.cx>2018-11-03 10:55:03 +0100
commit19d91f788d77227a7c00828bce6ffe91932cdcdd (patch)
treedf108119c3d9f6e250b46233cc2ac67b079d23e7
parentf84893f70901dfca356d949ea1585a56154cb59f (diff)
downloadredot-engine-19d91f788d77227a7c00828bce6ffe91932cdcdd.tar.gz
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
-rw-r--r--platform/windows/os_windows.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index f8705c4bff..5e9f9bc59b 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -58,11 +58,8 @@
static const WORD MAX_CONSOLE_LINES = 1500;
extern "C" {
-#ifdef _MSC_VER
-_declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
-#else
-__attribute__((visibility("default"))) DWORD NvOptimusEnablement = 0x00000001;
-#endif
+__declspec(dllexport) DWORD NvOptimusEnablement = 1;
+__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
}
// Workaround mingw-w64 < 4.0 bug