MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / loadProfileScript

Method loadProfileScript

Engine/source/gfx/gfxCardProfile.cpp:34–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32
33
34void GFXCardProfiler::loadProfileScript(const char* aScriptName)
35{
36 const String profilePath = Con::getVariable( "$pref::Video::profilePath" );
37 String scriptName = !profilePath.isEmpty() ? profilePath.c_str() : "profile";
38 scriptName += "/";
39 scriptName += aScriptName;
40
41 void *data = NULL;
42 U32 dataSize = 0;
43
44 Torque::FS::ReadFile( scriptName.c_str(), data, dataSize, true );
45
46 if(data == NULL)
47 {
48 Con::warnf(" - No card profile %s exists", scriptName.c_str());
49 return;
50 }
51
52 const char *script = static_cast<const char *>(data);
53
54 Con::printf(" - Loaded card profile %s", scriptName.c_str());
55
56 Con::evaluate(script, false, NULL);
57 delete[] script;
58}
59
60void GFXCardProfiler::loadProfileScripts(const String& render, const String& vendor, const String& card, const String& version)
61{

Callers

nothing calls this directly

Calls 7

getVariableFunction · 0.85
ReadFileFunction · 0.85
warnfFunction · 0.85
printfFunction · 0.85
evaluateFunction · 0.85
isEmptyMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected