feat: force application running on dedicated graphics card. So Minecraft can also run on dedicated graphics card too.

This commit is contained in:
huanghongxun 2021-09-10 21:21:51 +08:00
parent 95ea6610b1
commit 0256b8a971

View File

@ -6,6 +6,11 @@
Version J8(TEXT("8"));
extern "C" {
_declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
_declspec(dllexport) DWORD AmdPowerXpressRequestHighPerformance = 0x00000001;
}
void RawLaunchJVM(const std::wstring &javaPath, const std::wstring &workdir,
const std::wstring &jarPath) {
if (MyCreateProcess(