FIRE-15891: Add option to disable WMI check in case of problems

Ansariel 2015-04-19 11:51:26 +02:00
parent 4d9ebe5cf2
commit 92cebdf6a7
4 changed files with 27 additions and 4 deletions

View File

@ -443,7 +443,10 @@ LLDXDevice *LLDXHardware::findDevice(const std::string &vendor, const std::strin
}
*/
BOOL LLDXHardware::getInfo(BOOL vram_only)
// <FS:Ansariel> FIRE-15891: Add option to disable WMI check in case of problems
//BOOL LLDXHardware::getInfo(BOOL vram_only)
BOOL LLDXHardware::getInfo(BOOL vram_only, bool disable_wmi)
// </FS:Ansariel>
{
LLTimer hw_timer;
BOOL ok = FALSE;
@ -525,7 +528,10 @@ BOOL LLDXHardware::getInfo(BOOL vram_only)
get_wstring(device_containerp, L"szDeviceID", deviceID, 512);
if (SUCCEEDED(GetVideoMemoryViaWMI(deviceID, &vram)))
// <FS:Ansariel> FIRE-15891: Add option to disable WMI check in case of problems
//if (SUCCEEDED(GetVideoMemoryViaWMI(deviceID, &vram)))
if (!disable_wmi && SUCCEEDED(GetVideoMemoryViaWMI(deviceID, &vram)))
// </FS:Ansariel>
{
mVRAM = vram/(1024*1024);
}

View File

@ -86,7 +86,10 @@ public:
// Returns TRUE on success.
// vram_only TRUE does a "light" probe.
BOOL getInfo(BOOL vram_only);
// <FS:Ansariel> FIRE-15891: Add option to disable WMI check in case of problems
//BOOL getInfo(BOOL vram_only);
BOOL getInfo(BOOL vram_only, bool disable_wmi);
// </FS:Ansariel>
S32 getVRAM() const { return mVRAM; }

View File

@ -23274,6 +23274,17 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>Value</key>
<real>1.0</real>
</map>
<key>FSDisableWMIProbing</key>
<map>
<key>Comment</key>
<string>Disables VRAM detection via WMI probing on Windows systems</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
</map>
</llsd>

View File

@ -660,7 +660,10 @@ bool LLAppViewerWin32::initHardwareTest()
LL_DEBUGS("AppInit") << "Attempting to poll DirectX for hardware info" << LL_ENDL;
gDXHardware.setWriteDebugFunc(write_debug_dx);
BOOL probe_ok = gDXHardware.getInfo(vram_only);
// <FS:Ansariel> FIRE-15891: Add option to disable WMI check in case of problems
//BOOL probe_ok = gDXHardware.getInfo(vram_only);
BOOL probe_ok = gDXHardware.getInfo(vram_only, gSavedSettings.getBOOL("FSDisableWMIProbing"));
// </FS:Ansariel>
if (!probe_ok
&& gWarningSettings.getBOOL("AboutDirectX9"))