Case 20301 - add platform info
Showing the changes to interface/src/Application.cpp (1 of 11 files). Show all
Unified · Split
| @@ -170,6 +170,7 @@ · 169 unmodified lines | ||
| 170 | 170 | #include "scripting/Audio.h" |
| 171 | 171 | #include "networking/CloseEventSender.h" |
| 172 | 172 | #include "scripting/TestScriptingInterface.h" |
| 173 | +#include "scripting/PlatformInfoScriptingInterface.h" | |
| 173 | 174 | #include "scripting/AssetMappingsScriptingInterface.h" |
| 174 | 175 | #include "scripting/ClipboardScriptingInterface.h" |
| 175 | 176 | #include "scripting/DesktopScriptingInterface.h" |
| @@ -6988,6 +6989,7 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEnginePointe · 6812 unmodified lines | ||
| 6988 | 6989 | scriptEngine->registerGlobalObject("Test", TestScriptingInterface::getInstance()); |
| 6989 | 6990 | } |
| 6990 | 6991 | |
| 6992 | + scriptEngine->registerGlobalObject("PlatformInfo", PlatformInfoScriptingInterface::getInstance()); | |
| 6991 | 6993 | scriptEngine->registerGlobalObject("Rates", new RatesScriptingInterface(this)); |
| 6992 | 6994 | |
| 6993 | 6995 | // hook our avatar and avatar hash map object into this script engine |
| @@ -8705,6 +8707,14 @@ void Application::updateLoginDialogOverlayPosition() { · 1711 unmodified lines | ||
| 8705 | 8707 | } |
| 8706 | 8708 | } |
| 8707 | 8709 | |
| 8710 | +bool Application::hasRiftControllers() { | |
| 8711 | + return PluginUtils::isOculusTouchControllerAvailable(); | |
| 8712 | +} | |
| 8713 | + | |
| 8714 | +bool Application::hasViveControllers() { | |
| 8715 | + return PluginUtils::isViveControllerAvailable(); | |
| 8716 | +} | |
| 8717 | + | |
| 8708 | 8718 | void Application::onDismissedLoginDialog() { |
| 8709 | 8719 | _loginDialogPoppedUp = false; |
| 8710 | 8720 | loginDialogPoppedUp.set(false); |
| @@ -8923,6 +8933,10 @@ void Application::copyToClipboard(const QString& text) { · 212 unmodified lines | ||
| 8923 | 8933 | QApplication::clipboard()->setText(text); |
| 8924 | 8934 | } |
| 8925 | 8935 | |
| 8936 | +QString Application::getGraphicsCardType() { | |
| 8937 | + return GPUIdent::getInstance()->getName(); | |
| 8938 | +} | |
| 8939 | + | |
| 8926 | 8940 | #if defined(Q_OS_ANDROID) |
| 8927 | 8941 | void Application::beforeEnterBackground() { |
| 8928 | 8942 | auto nodeList = DependencyManager::get<NodeList>(); |