mirror of
https://github.com/overte-org/overte.git
synced 2025-08-11 06:22:10 +02:00
did not work on linux, backing out change
This commit is contained in:
parent
47a612b195
commit
5f81224976
1 changed files with 1 additions and 20 deletions
|
@ -84,26 +84,7 @@ GPUIdent* GPUIdent::ensureQuery(const QString& vendor, const QString& renderer)
|
||||||
|
|
||||||
_dedicatedMemoryMB = bestVRAM;
|
_dedicatedMemoryMB = bestVRAM;
|
||||||
CGLDestroyRendererInfo(rendererInfo);
|
CGLDestroyRendererInfo(rendererInfo);
|
||||||
#elif defined(Q_OS_LINUX)
|
|
||||||
//get gpu name
|
|
||||||
FILE* stream = popen("system_profiler SPDisplaysDataType | grep Chipset", "r");
|
|
||||||
|
|
||||||
std::ostringstream hostStream;
|
|
||||||
while (!feof(stream) && !ferror(stream)) {
|
|
||||||
char buf[128];
|
|
||||||
int bytesRead = fread(buf, 1, 128, stream);
|
|
||||||
hostStream.write(buf, bytesRead);
|
|
||||||
}
|
|
||||||
|
|
||||||
QString result = QString::fromStdString(hostStream.str());
|
|
||||||
QStringList parts = result.split('\n');
|
|
||||||
std::string name;
|
|
||||||
|
|
||||||
for (int i = 0; i < parts.size(); ++i) {
|
|
||||||
if (parts[i].toLower().contains("radeon") || parts[i].toLower().contains("nvidia")) {
|
|
||||||
_name=parts[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#elif defined(Q_OS_WIN)
|
#elif defined(Q_OS_WIN)
|
||||||
|
|
||||||
struct ConvertLargeIntegerToQString {
|
struct ConvertLargeIntegerToQString {
|
||||||
|
|
Loading…
Reference in a new issue