mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +02:00
Can read graphics card type.
This commit is contained in:
parent
6debd996c5
commit
76ce63da64
4 changed files with 19 additions and 2 deletions
|
@ -8931,6 +8931,10 @@ void Application::copyToClipboard(const QString& text) {
|
||||||
QApplication::clipboard()->setText(text);
|
QApplication::clipboard()->setText(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString Application::getGraphicsCardType() {
|
||||||
|
return GPUIdent::getInstance()->getName();
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(Q_OS_ANDROID)
|
#if defined(Q_OS_ANDROID)
|
||||||
void Application::beforeEnterBackground() {
|
void Application::beforeEnterBackground() {
|
||||||
auto nodeList = DependencyManager::get<NodeList>();
|
auto nodeList = DependencyManager::get<NodeList>();
|
||||||
|
|
|
@ -459,6 +459,8 @@ public slots:
|
||||||
|
|
||||||
void changeViewAsNeeded(float boomLength);
|
void changeViewAsNeeded(float boomLength);
|
||||||
|
|
||||||
|
QString Application::getGraphicsCardType();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void onDesktopRootItemCreated(QQuickItem* qmlContext);
|
void onDesktopRootItemCreated(QQuickItem* qmlContext);
|
||||||
void onDesktopRootContextCreated(QQmlContext* qmlContext);
|
void onDesktopRootContextCreated(QQmlContext* qmlContext);
|
||||||
|
@ -787,6 +789,5 @@ private:
|
||||||
|
|
||||||
bool _showTrackedObjects { false };
|
bool _showTrackedObjects { false };
|
||||||
bool _prevShowTrackedObjects { false };
|
bool _prevShowTrackedObjects { false };
|
||||||
|
|
||||||
};
|
};
|
||||||
#endif // hifi_Application_h
|
#endif // hifi_Application_h
|
||||||
|
|
|
@ -6,8 +6,9 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
#include "PlatformInfoScriptingInterface.h"
|
#include "PlatformInfoScriptingInterface.h"
|
||||||
|
#include "Application.h"
|
||||||
|
|
||||||
# include <thread>
|
#include <thread>
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
@ -69,4 +70,8 @@ int PlatformInfoScriptingInterface::getTotalSystemMemoryMB() {
|
||||||
#else
|
#else
|
||||||
return -1;
|
return -1;
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
QString PlatformInfoScriptingInterface::getGraphicsCardType() {
|
||||||
|
return qApp->getGraphicsCardType();
|
||||||
}
|
}
|
|
@ -46,6 +46,13 @@ public slots:
|
||||||
* @returns {int} size of memory in megabytes
|
* @returns {int} size of memory in megabytes
|
||||||
*/
|
*/
|
||||||
int getTotalSystemMemoryMB();
|
int getTotalSystemMemoryMB();
|
||||||
|
|
||||||
|
/**jsdoc
|
||||||
|
* Returns the graphics card type
|
||||||
|
* @function Test.getGraphicsCardType
|
||||||
|
* @returns {string} graphics card type
|
||||||
|
*/
|
||||||
|
QString getGraphicsCardType();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_PlatformInfoScriptingInterface_h
|
#endif // hifi_PlatformInfoScriptingInterface_h
|
||||||
|
|
Loading…
Reference in a new issue