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 | #include "scripting/Audio.h" | 170 | #include "scripting/Audio.h" |
| 171 | #include "networking/CloseEventSender.h" | 171 | #include "networking/CloseEventSender.h" |
| 172 | #include "scripting/TestScriptingInterface.h" | 172 | #include "scripting/TestScriptingInterface.h" |
| 173 | #include "scripting/PlatformInfoScriptingInterface.h" | ||
| 173 | #include "scripting/AssetMappingsScriptingInterface.h" | 174 | #include "scripting/AssetMappingsScriptingInterface.h" |
| 174 | #include "scripting/ClipboardScriptingInterface.h" | 175 | #include "scripting/ClipboardScriptingInterface.h" |
| 175 | #include "scripting/DesktopScriptingInterface.h" | 176 | #include "scripting/DesktopScriptingInterface.h" |
| @@ -6988,6 +6989,7 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEnginePointe · 6812 unmodified lines | |||
| 6988 | scriptEngine->registerGlobalObject("Test", TestScriptingInterface::getInstance()); | 6989 | scriptEngine->registerGlobalObject("Test", TestScriptingInterface::getInstance()); |
| 6989 | } | 6990 | } |
| 6990 | 6991 | ||
| 6992 | scriptEngine->registerGlobalObject("PlatformInfo", PlatformInfoScriptingInterface::getInstance()); | ||
| 6991 | scriptEngine->registerGlobalObject("Rates", new RatesScriptingInterface(this)); | 6993 | scriptEngine->registerGlobalObject("Rates", new RatesScriptingInterface(this)); |
| 6992 | 6994 | ||
| 6993 | // hook our avatar and avatar hash map object into this script engine | 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 | void Application::onDismissedLoginDialog() { | 8718 | void Application::onDismissedLoginDialog() { |
| 8709 | _loginDialogPoppedUp = false; | 8719 | _loginDialogPoppedUp = false; |
| 8710 | loginDialogPoppedUp.set(false); | 8720 | loginDialogPoppedUp.set(false); |
| @@ -8923,6 +8933,10 @@ void Application::copyToClipboard(const QString& text) { · 212 unmodified lines | |||
| 8923 | QApplication::clipboard()->setText(text); | 8933 | QApplication::clipboard()->setText(text); |
| 8924 | } | 8934 | } |
| 8925 | 8935 | ||
| 8936 | QString Application::getGraphicsCardType() { | ||
| 8937 | return GPUIdent::getInstance()->getName(); | ||
| 8938 | } | ||
| 8939 | |||
| 8926 | #if defined(Q_OS_ANDROID) | 8940 | #if defined(Q_OS_ANDROID) |
| 8927 | void Application::beforeEnterBackground() { | 8941 | void Application::beforeEnterBackground() { |
| 8928 | auto nodeList = DependencyManager::get<NodeList>(); | 8942 | auto nodeList = DependencyManager::get<NodeList>(); |