From 8a5f548f870c822693bb1c728c571e664667e5eb Mon Sep 17 00:00:00 2001 From: Eidolon Date: Mon, 16 Mar 2026 13:58:36 -0500 Subject: [PATCH] Enable dedi gpu on laptops by default --- src/sdl/i_main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/sdl/i_main.cpp b/src/sdl/i_main.cpp index f2fa2fce9..0566eb146 100644 --- a/src/sdl/i_main.cpp +++ b/src/sdl/i_main.cpp @@ -310,3 +310,12 @@ void operator delete(void* ptr) noexcept TracyFree(ptr); free(ptr); } + +// Enable high performance graphics on multi-gpu laptops, since we can't pick devices in WGL +#ifdef _WIN32 +extern "C" +{ +__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; +__declspec(dllexport) DWORD AmdPowerXpressRequestHighPerformance = 0x00000001; +} +#endif