MCPcopy Create free account
hub / github.com/baldurk/renderdoc / Load

Method Load

qrenderdoc/Code/Interface/PersistantConfig.cpp:473–598  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

471}
472
473bool PersistantConfig::Load(const rdcstr &filename)
474{
475 bool ret = Deserialize(filename);
476
477 RDDialog::DefaultBrowsePath = LastFileBrowsePath;
478
479 // localhost should always be available as a remote host
480 {
481 QMutexLocker autolock(&RemoteHostLock);
482
483 bool foundLocalhost = false;
484
485 rdcarray<RemoteHost> hosts;
486 hosts.swap(RemoteHostList);
487
488 for(RemoteHost host : hosts)
489 {
490 // skip invalid hosts
491 if(!host.IsValid())
492 continue;
493
494 // backwards compatibility - skip old adb hosts that were adb:
495 if(host.Hostname().find("adb:") >= 0 && host.Protocol() == NULL)
496 continue;
497
498 RemoteHostList.push_back(host);
499
500 if(host.IsLocalhost())
501 foundLocalhost = true;
502 }
503
504 if(!foundLocalhost)
505 {
506 RemoteHost host;
507 host.m_hostname = "localhost";
508 RemoteHostList.insert(0, host);
509 }
510 }
511
512 bool tools[arraydim<KnownShaderTool>()] = {};
513
514 // see which known tools are registered
515 for(const ShaderProcessingTool &dis : ShaderProcessors)
516 {
517 // if it's declared
518 if(dis.tool != KnownShaderTool::Unknown && dis.tool < KnownShaderTool::Count)
519 tools[(size_t)dis.tool] = true;
520 }
521
522 for(KnownShaderTool tool : values<KnownShaderTool>())
523 {
524 if(tool == KnownShaderTool::Unknown || tools[(size_t)tool])
525 continue;
526
527 rdcstr exe = ToolExecutable(tool);
528
529 if(exe.isEmpty())
530 continue;

Callers

nothing calls this directly

Calls 10

ToolExecutableFunction · 0.85
ToolInputFunction · 0.85
ToolOutputFunction · 0.85
ToQStrFunction · 0.50
swapMethod · 0.45
IsValidMethod · 0.45
findMethod · 0.45
push_backMethod · 0.45
insertMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected