]> git.mxchange.org Git - flightgear.git/commitdiff
Add some debug messages to help analyzing #385.
authorThorstenB <brehmt@gmail.com>
Sat, 17 Dec 2011 14:26:50 +0000 (15:26 +0100)
committerThorstenB <brehmt@gmail.com>
Sat, 17 Dec 2011 14:26:50 +0000 (15:26 +0100)
src/Main/FGEventHandler.cxx
src/Main/WindowBuilder.cxx
src/Main/renderer.cxx

index 562d807918ec13dc3729d5b32c70163109d50432..936b02fc34ac19ecbb3ba01d8460ba8989f1551c 100644 (file)
@@ -239,6 +239,7 @@ bool FGEventHandler::handle(const osgGA::GUIEventAdapter& ea,
             (*mouseMotionHandler)(x, y);
         return true;
     case osgGA::GUIEventAdapter::RESIZE:
+        SG_LOG(SG_VIEW, SG_DEBUG, "FGEventHandler::handle: RESIZE event " << ea.getWindowHeight() << " x " << ea.getWindowWidth() << ", resizable: " << resizable);
         CameraGroup::getDefault()->resized();
         if (resizable)
           globals->get_renderer()->resize(ea.getWindowWidth(), ea.getWindowHeight());
index e946a2562b844f9e884923928308aee41a757441..cb19eb77261c8459d0b00e9db02b2775b0c77ac5 100644 (file)
@@ -90,6 +90,7 @@ WindowBuilder::makeDefaultTraits(bool stencil)
         traits->supportsResize = false;
         traits->width = screenwidth;
         traits->height = screenheight;
+        SG_LOG(SG_VIEW,SG_DEBUG,"Using full screen size for window: " << screenwidth << " x " << screenheight);
     } else {
         // window
         int w = fgGetInt("/sim/startup/xsize");
@@ -102,6 +103,7 @@ WindowBuilder::makeDefaultTraits(bool stencil)
             traits->x = ((unsigned)w>screenwidth) ? 0 : (screenwidth-w)/3;
             traits->y = ((unsigned)h>screenheight) ? 0 : (screenheight-h)/3;
         }
+        SG_LOG(SG_VIEW,SG_DEBUG,"Using initial window size: " << w << " x " << h);
     }
     return traits;
 }
index 48b22841cef5411dbed1612966f38604ab51eda4..25ece71de3820f40cf61ffe0007bfe891809a250 100644 (file)
@@ -805,6 +805,7 @@ FGRenderer::resize( int width, int height )
 {
     int curWidth = _xsize->getIntValue(),
         curHeight = _ysize->getIntValue();
+    SG_LOG(SG_VIEW, SG_DEBUG, "FGRenderer::resize: new size " << width << " x " << height);
     if ((curHeight != height) || (curWidth != width)) {
     // must guard setting these, or PLIB-PUI fails with too many live interfaces
         _xsize->setIntValue(width);