From b575446b360eb5e7fca8b3dd877afc949dd8c0ea Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Sat, 17 Dec 2011 15:26:50 +0100 Subject: [PATCH] Add some debug messages to help analyzing #385. --- src/Main/FGEventHandler.cxx | 1 + src/Main/WindowBuilder.cxx | 2 ++ src/Main/renderer.cxx | 1 + 3 files changed, 4 insertions(+) diff --git a/src/Main/FGEventHandler.cxx b/src/Main/FGEventHandler.cxx index 562d80791..936b02fc3 100644 --- a/src/Main/FGEventHandler.cxx +++ b/src/Main/FGEventHandler.cxx @@ -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()); diff --git a/src/Main/WindowBuilder.cxx b/src/Main/WindowBuilder.cxx index e946a2562..cb19eb772 100644 --- a/src/Main/WindowBuilder.cxx +++ b/src/Main/WindowBuilder.cxx @@ -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; } diff --git a/src/Main/renderer.cxx b/src/Main/renderer.cxx index 48b22841c..25ece71de 100644 --- a/src/Main/renderer.cxx +++ b/src/Main/renderer.cxx @@ -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);