From Chris Denham, fix for swapBuffers warning when window is minimized under Windows.

svn merge -r 10146:10147 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osgViewer/
This commit is contained in:
Robert Osfield
2009-05-07 13:18:35 +00:00
parent 029c114c4c
commit e1c5969b0e

View File

@@ -1782,7 +1782,7 @@ void GraphicsWindowWin32::closeImplementation()
void GraphicsWindowWin32::swapBuffersImplementation()
{
if (!_realized) return;
if (!::SwapBuffers(_hdc))
if (!::SwapBuffers(_hdc) && ::GetLastError() != 0)
{
reportErrorForScreen("GraphicsWindowWin32::swapBuffersImplementation() - Unable to swap display buffers", _traits->screenNum, ::GetLastError());
}