MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / runPciconf

Function runPciconf

launcher/minecraft/launch/PrintInstanceInfo.cpp:76–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76void runPciconf(QStringList& log)
77{
78 char buff[512];
79 std::string strcard;
80 FILE* pciconf = popen("pciconf -lv -a vgapci0", "r");
81 while (fgets(buff, 512, pciconf) != NULL) {
82 if (strncmp(buff, " vendor", 10) == 0) {
83 std::string str(buff);
84 strcard.append(str.substr(str.find_first_of("'") + 1, str.find_last_not_of("'") - (str.find_first_of("'") + 2)));
85 strcard.append(" ");
86 } else if (strncmp(buff, " device", 10) == 0) {
87 std::string str2(buff);
88 strcard.append(str2.substr(str2.find_first_of("'") + 1, str2.find_last_not_of("'") - (str2.find_first_of("'") + 2)));
89 }
90 log << QString::fromStdString(strcard);
91 break;
92 }
93 pclose(pciconf);
94}
95#endif
96void runGlxinfo(QStringList& log)
97{

Callers 1

executeTaskMethod · 0.85

Calls 2

fromStdStringFunction · 0.85
appendMethod · 0.80

Tested by

no test coverage detected