From 6d5a021f041224ad869f87e1db0b39cc09b803b1 Mon Sep 17 00:00:00 2001 From: Ancurio Date: Wed, 6 Oct 2021 23:41:35 +0200 Subject: [PATCH] Main: Request us to be run on dedicated GPU --- src/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 7e72e9a..b83eafe 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -42,6 +42,14 @@ #ifdef __WINDOWS__ #include "resource.h" + +// Try to force dedicated GPU +// https://stackoverflow.com/a/39047129 +extern "C" +{ + __declspec(dllexport) unsigned long NvOptimusEnablement = 0x00000001; + __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1; +} #endif #include "icon.png.xxd"