An experiment to see if dual-card Windows desktops can be made to answer

the correct card.
This commit is contained in:
howard-stearns 2016-04-17 14:55:51 -07:00 committed by Brad Davis
parent cb137635db
commit b403dcb0d9
2 changed files with 5 additions and 1 deletions

View file

@ -18,6 +18,7 @@
#include <QtCore/qjsonobject.h>
#include <QtCore/qjsonvalue.h>
#include <shared/JSONHelpers.h>
#include <GPUIdent.h>
#include "SettingHandle.h"
@ -179,6 +180,8 @@ public:
// getter for qml integration, prefer the templated getter
Q_INVOKABLE QObject* getConfig(const QString& name) { return QObject::findChild<JobConfig*>(name); }
Q_INVOKABLE uint getVRam() { return GPUIdent::getInstance()->getMemory(); }
Q_INVOKABLE QString getVCard() { return GPUIdent::getInstance()->getName(); }
// getter for cpp (strictly typed), prefer this getter
template <class T> typename T::Config* getConfig(std::string job = "") const {
QString name = job.empty() ? QString() : QString(job.c_str()); // an empty string is not a null string

View file

@ -752,12 +752,13 @@ void printSystemInformation() {
}
#endif
GPUIdent* gpu = GPUIdent::getInstance();
if (gpu->isValid()) {
/*if (gpu->isValid()) {
qDebug() << "GPU:";
qDebug() << "\tcard:" << gpu->getName();
qDebug() << "\tdriver:" << gpu->getDriver();
qDebug() << "\tdedicated memory:" << gpu->getMemory() << "MB";
}
*/
qDebug() << "Environment Variables";
// List of env variables to include in the log. For privacy reasons we don't send all env variables.