mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1003293 - Addition: Properly detect optimus on all different build. r=bas
This commit is contained in:
parent
c7b4c78ee5
commit
24ef8f30ff
@ -1486,7 +1486,18 @@ gfxWindowsPlatform::GetD3D11Device()
|
||||
bool
|
||||
gfxWindowsPlatform::IsOptimus()
|
||||
{
|
||||
return GetModuleHandleA("nvumdshim.dll");
|
||||
static int knowIsOptimus = -1;
|
||||
if (knowIsOptimus == -1) {
|
||||
// other potential optimus -- nvd3d9wrapx.dll & nvdxgiwrap.dll
|
||||
if (GetModuleHandleA("nvumdshim.dll") ||
|
||||
GetModuleHandleA("nvumdshimx.dll"))
|
||||
{
|
||||
knowIsOptimus = 1;
|
||||
} else {
|
||||
knowIsOptimus = 0;
|
||||
}
|
||||
}
|
||||
return knowIsOptimus;
|
||||
}
|
||||
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user