aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llwindow/lldxhardware.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:42 -0500
committerJacek Antonelli2008-08-15 23:45:42 -0500
commitce28e056c20bf2723f565bbf464b87781ec248a2 (patch)
treeef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/llwindow/lldxhardware.cpp
parentSecond Life viewer sources 1.19.1.4b (diff)
downloadmeta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.zip
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.gz
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.bz2
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.xz
Second Life viewer sources 1.20.2
Diffstat (limited to 'linden/indra/llwindow/lldxhardware.cpp')
-rw-r--r--linden/indra/llwindow/lldxhardware.cpp37
1 files changed, 24 insertions, 13 deletions
diff --git a/linden/indra/llwindow/lldxhardware.cpp b/linden/indra/llwindow/lldxhardware.cpp
index 352a5a3..4eb8cab 100644
--- a/linden/indra/llwindow/lldxhardware.cpp
+++ b/linden/indra/llwindow/lldxhardware.cpp
@@ -233,9 +233,10 @@ LLDXHardware::LLDXHardware()
233 233
234void LLDXHardware::cleanup() 234void LLDXHardware::cleanup()
235{ 235{
236 for_each(mDevices.begin(), mDevices.end(), DeletePairedPointer()); 236 // for_each(mDevices.begin(), mDevices.end(), DeletePairedPointer());
237} 237}
238 238
239/*
239LLString LLDXHardware::dumpDevices() 240LLString LLDXHardware::dumpDevices()
240{ 241{
241 if (gWriteDebug) 242 if (gWriteDebug)
@@ -284,6 +285,7 @@ LLDXDevice *LLDXHardware::findDevice(const std::string &vendor, const std::strin
284 285
285 return NULL; 286 return NULL;
286} 287}
288*/
287 289
288BOOL LLDXHardware::getInfo(BOOL vram_only) 290BOOL LLDXHardware::getInfo(BOOL vram_only)
289{ 291{
@@ -296,7 +298,7 @@ BOOL LLDXHardware::getInfo(BOOL vram_only)
296 IDxDiagProvider *dx_diag_providerp = NULL; 298 IDxDiagProvider *dx_diag_providerp = NULL;
297 IDxDiagContainer *dx_diag_rootp = NULL; 299 IDxDiagContainer *dx_diag_rootp = NULL;
298 IDxDiagContainer *devices_containerp = NULL; 300 IDxDiagContainer *devices_containerp = NULL;
299 IDxDiagContainer *system_device_containerp= NULL; 301 // IDxDiagContainer *system_device_containerp= NULL;
300 IDxDiagContainer *device_containerp = NULL; 302 IDxDiagContainer *device_containerp = NULL;
301 IDxDiagContainer *file_containerp = NULL; 303 IDxDiagContainer *file_containerp = NULL;
302 IDxDiagContainer *driver_containerp = NULL; 304 IDxDiagContainer *driver_containerp = NULL;
@@ -362,15 +364,18 @@ BOOL LLDXHardware::getInfo(BOOL vram_only)
362 } 364 }
363 365
364 // Get the English VRAM string 366 // Get the English VRAM string
365 std::string ram_str = get_string(device_containerp, L"szDisplayMemoryEnglish"); 367 {
368 std::string ram_str = get_string(device_containerp, L"szDisplayMemoryEnglish");
366 369
367 // We don't need the device any more 370 // We don't need the device any more
368 SAFE_RELEASE(device_containerp); 371 SAFE_RELEASE(device_containerp);
372
373 // Dump the string as an int into the structure
374 char *stopstring;
375 mVRAM = strtol(ram_str.c_str(), &stopstring, 10);
376 llinfos << "VRAM Detected: " << mVRAM << " DX9 string: " << ram_str << llendl;
377 }
369 378
370 // Dump the string as an int into the structure
371 char *stopstring;
372 mVRAM = strtol(ram_str.c_str(), &stopstring, 10);
373 llinfos << "VRAM Detected: " << mVRAM << " DX9 string: " << ram_str << llendl;
374 379
375 if (vram_only) 380 if (vram_only)
376 { 381 {
@@ -378,6 +383,11 @@ BOOL LLDXHardware::getInfo(BOOL vram_only)
378 goto LCleanup; 383 goto LCleanup;
379 } 384 }
380 385
386
387 /* for now, we ONLY do vram_only the rest of this
388 is commented out, to ensure no-one is tempted
389 to use it
390
381 // Now let's get device and driver information 391 // Now let's get device and driver information
382 // Get the IDxDiagContainer object called "DxDiag_SystemDevices". 392 // Get the IDxDiagContainer object called "DxDiag_SystemDevices".
383 // This call may take some time while dxdiag gathers the info. 393 // This call may take some time while dxdiag gathers the info.
@@ -504,11 +514,12 @@ BOOL LLDXHardware::getInfo(BOOL vram_only)
504 } 514 }
505 SAFE_RELEASE(device_containerp); 515 SAFE_RELEASE(device_containerp);
506 } 516 }
517 */
507 } 518 }
508 519
509 dumpDevices(); 520 // dumpDevices();
510 ok = TRUE; 521 ok = TRUE;
511 522
512LCleanup: 523LCleanup:
513 if (!ok) 524 if (!ok)
514 { 525 {
@@ -526,7 +537,7 @@ LCleanup:
526 CoUninitialize(); 537 CoUninitialize();
527 538
528 return ok; 539 return ok;
529} 540 }
530 541
531LLSD LLDXHardware::getDisplayInfo() 542LLSD LLDXHardware::getDisplayInfo()
532{ 543{