Skip to content

Commit 51136c4

Browse files
committed
Use nvidia/AMD preferred graphics card hints
Uses nvidia/AMD graphics card hints for cef-bootstrap similarly to the main program.
1 parent 3b8ac9e commit 51136c4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cef-bootstrap/cef-bootstrap-main.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@
2020
#include "browser-app.hpp"
2121

2222
#ifdef _WIN32
23+
24+
// GPU hint exports for AMD/NVIDIA laptops
25+
#ifdef _MSC_VER
26+
extern "C" __declspec(dllexport) DWORD NvOptimusEnablement = 1;
27+
extern "C" __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
28+
#endif
29+
2330
int CALLBACK WinMain(HINSTANCE, HINSTANCE,
2431
LPSTR, int)
2532
{

0 commit comments

Comments
 (0)