Showing the changes to interface/src/Application.cpp (1 of 47 files). Show all
Unified · Split
| @@ -126,6 +126,7 @@ · 125 unmodified lines | |||
| 126 | #include "scripting/AccountScriptingInterface.h" | 126 | #include "scripting/AccountScriptingInterface.h" |
| 127 | #include "scripting/AudioDeviceScriptingInterface.h" | 127 | #include "scripting/AudioDeviceScriptingInterface.h" |
| 128 | #include "scripting/ClipboardScriptingInterface.h" | 128 | #include "scripting/ClipboardScriptingInterface.h" |
| 129 | #include "scripting/DesktopScriptingInterface.h" | ||
| 129 | #include "scripting/HMDScriptingInterface.h" | 130 | #include "scripting/HMDScriptingInterface.h" |
| 130 | #include "scripting/GlobalServicesScriptingInterface.h" | 131 | #include "scripting/GlobalServicesScriptingInterface.h" |
| 131 | #include "scripting/LocationScriptingInterface.h" | 132 | #include "scripting/LocationScriptingInterface.h" |
| @@ -284,6 +285,7 @@ bool setupEssentials(int& argc, char** argv) { · 152 unmodified lines | |||
| 284 | auto dialogsManager = DependencyManager::set<DialogsManager>(); | 285 | auto dialogsManager = DependencyManager::set<DialogsManager>(); |
| 285 | auto bandwidthRecorder = DependencyManager::set<BandwidthRecorder>(); | 286 | auto bandwidthRecorder = DependencyManager::set<BandwidthRecorder>(); |
| 286 | auto resourceCacheSharedItems = DependencyManager::set<ResourceCacheSharedItems>(); | 287 | auto resourceCacheSharedItems = DependencyManager::set<ResourceCacheSharedItems>(); |
| 288 | auto desktopScriptingInterface = DependencyManager::set<DesktopScriptingInterface>(); | ||
| 287 | auto entityScriptingInterface = DependencyManager::set<EntityScriptingInterface>(); | 289 | auto entityScriptingInterface = DependencyManager::set<EntityScriptingInterface>(); |
| 288 | auto windowScriptingInterface = DependencyManager::set<WindowScriptingInterface>(); | 290 | auto windowScriptingInterface = DependencyManager::set<WindowScriptingInterface>(); |
| 289 | #if defined(Q_OS_MAC) || defined(Q_OS_WIN) | 291 | #if defined(Q_OS_MAC) || defined(Q_OS_WIN) |
| @@ -1269,7 +1271,7 @@ void Application::resizeGL() { · 979 unmodified lines | |||
| 1269 | loadViewFrustum(_myCamera, _viewFrustum); | 1271 | loadViewFrustum(_myCamera, _viewFrustum); |
| 1270 | float fov = glm::radians(DEFAULT_FIELD_OF_VIEW_DEGREES); | 1272 | float fov = glm::radians(DEFAULT_FIELD_OF_VIEW_DEGREES); |
| 1271 | // FIXME the aspect ratio for stereo displays is incorrect based on this. | 1273 | // FIXME the aspect ratio for stereo displays is incorrect based on this. |
| 1272 | float aspectRatio = aspect(_renderResolution); | 1274 | float aspectRatio = displayPlugin->getRecommendedAspectRatio(); |
| 1273 | _myCamera.setProjection(glm::perspective(fov, aspectRatio, DEFAULT_NEAR_CLIP, DEFAULT_FAR_CLIP)); | 1275 | _myCamera.setProjection(glm::perspective(fov, aspectRatio, DEFAULT_NEAR_CLIP, DEFAULT_FAR_CLIP)); |
| 1274 | } | 1276 | } |
| 1275 | 1277 | ||
| @@ -1425,7 +1427,6 @@ void Application::keyPressEvent(QKeyEvent* event) { · 149 unmodified lines | |||
| 1425 | bool isMeta = event->modifiers().testFlag(Qt::ControlModifier); | 1427 | bool isMeta = event->modifiers().testFlag(Qt::ControlModifier); |
| 1426 | bool isOption = event->modifiers().testFlag(Qt::AltModifier); | 1428 | bool isOption = event->modifiers().testFlag(Qt::AltModifier); |
| 1427 | switch (event->key()) { | 1429 | switch (event->key()) { |
| 1428 | break; | ||
| 1429 | case Qt::Key_Enter: | 1430 | case Qt::Key_Enter: |
| 1430 | case Qt::Key_Return: | 1431 | case Qt::Key_Return: |
| 1431 | if (isOption) { | 1432 | if (isOption) { |
| @@ -3971,6 +3972,8 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEngine* scri · 2539 unmodified lines | |||
| 3971 | qScriptRegisterMetaType(scriptEngine, RayToOverlayIntersectionResultToScriptValue, | 3972 | qScriptRegisterMetaType(scriptEngine, RayToOverlayIntersectionResultToScriptValue, |
| 3972 | RayToOverlayIntersectionResultFromScriptValue); | 3973 | RayToOverlayIntersectionResultFromScriptValue); |
| 3973 | 3974 | ||
| 3975 | scriptEngine->registerGlobalObject("Desktop", DependencyManager::get<DesktopScriptingInterface>().data()); | ||
| 3976 | |||
| 3974 | QScriptValue windowValue = scriptEngine->registerGlobalObject("Window", DependencyManager::get<WindowScriptingInterface>().data()); | 3977 | QScriptValue windowValue = scriptEngine->registerGlobalObject("Window", DependencyManager::get<WindowScriptingInterface>().data()); |
| 3975 | scriptEngine->registerGetterSetter("location", LocationScriptingInterface::locationGetter, | 3978 | scriptEngine->registerGetterSetter("location", LocationScriptingInterface::locationGetter, |
| 3976 | LocationScriptingInterface::locationSetter, windowValue); | 3979 | LocationScriptingInterface::locationSetter, windowValue); |