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