Automatically switch to dedicated GPU in OpenGOAL runtime (#1715)

* Automatically switch to dedicated GPU for runtime

Some machines with dual-GPUs cannot properly detect OpenGOAL as a high-performance application and properly utilize the dedicated GPU. This sets a flag for both Radeon and NVIDIA GPUs to always use the high performance GPU when available. I do not have a dual-GPU machine to test this on, but this should just work out of the box.

* clang-format

One day I will understand clang
This commit is contained in:
Shalen Bennett
2022-07-31 11:32:22 -06:00
committed by GitHub
parent 88856ba5e0
commit 8daa3c2e00
+7
View File
@@ -17,6 +17,13 @@
#include "game/discord.h"
#ifdef _WIN32
extern "C" {
__declspec(dllexport) unsigned long NvOptimusEnablement = 0x00000001;
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
}
#endif
// Discord RPC
extern int64_t gStartTime;