]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_os_osgviewer.cxx
Sync. w. JSBSim CVS
[flightgear.git] / src / Main / fg_os_osgviewer.cxx
index 628be161263b34e10c713d29d483d3bc7cec8d96..8badbd6d1418c00b329cd8b2fb14405134dabb3d 100644 (file)
@@ -103,9 +103,9 @@ void fgOSOpenWindow(bool stencil)
     // Look for windows, camera groups, and the old syntax of
     // top-level cameras
     SGPropertyNode* renderingNode = fgGetNode("/sim/rendering");
-    SGPropertyNode* cgroupNode = renderingNode->getChild("camera-group");
-    if (!cgroupNode) {
-        cgroupNode = renderingNode->getNode("camera-group", true);
+    SGPropertyNode* cgroupNode = renderingNode->getNode("camera-group", true);
+    bool oldSyntax = !cgroupNode->hasChild("camera");
+    if (oldSyntax) {
         for (int i = 0; i < renderingNode->nChildren(); ++i) {
             SGPropertyNode* propNode = renderingNode->getChild(i);
             const char* propName = propNode->getName();
@@ -227,6 +227,22 @@ static void setMouseCursor(osg::Camera* camera, int cursor)
         mouseCursor = osgViewer::GraphicsWindow::CrosshairCursor;
     else if(cursor == MOUSE_CURSOR_LEFTRIGHT)
         mouseCursor = osgViewer::GraphicsWindow::LeftRightCursor;
+    else if(cursor == MOUSE_CURSOR_TOPSIDE)
+        mouseCursor = osgViewer::GraphicsWindow::TopSideCursor;
+    else if(cursor == MOUSE_CURSOR_BOTTOMSIDE)
+        mouseCursor = osgViewer::GraphicsWindow::BottomSideCursor;
+    else if(cursor == MOUSE_CURSOR_LEFTSIDE)
+        mouseCursor = osgViewer::GraphicsWindow::LeftSideCursor;
+    else if(cursor == MOUSE_CURSOR_RIGHTSIDE)
+        mouseCursor = osgViewer::GraphicsWindow::RightSideCursor;
+    else if(cursor == MOUSE_CURSOR_TOPLEFT)
+        mouseCursor = osgViewer::GraphicsWindow::TopLeftCorner;
+    else if(cursor == MOUSE_CURSOR_TOPRIGHT)
+        mouseCursor = osgViewer::GraphicsWindow::TopRightCorner;
+    else if(cursor == MOUSE_CURSOR_BOTTOMLEFT)
+        mouseCursor = osgViewer::GraphicsWindow::BottomLeftCorner;
+    else if(cursor == MOUSE_CURSOR_BOTTOMRIGHT)
+        mouseCursor = osgViewer::GraphicsWindow::BottomRightCorner;
 
     gw->setCursor(mouseCursor);
 }