From e1c5969b0e19c59440ef7e52b7985a0aef334aac Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 7 May 2009 13:18:35 +0000 Subject: [PATCH] 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/ --- src/osgViewer/GraphicsWindowWin32.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgViewer/GraphicsWindowWin32.cpp b/src/osgViewer/GraphicsWindowWin32.cpp index 525b69036..6a48bf70c 100644 --- a/src/osgViewer/GraphicsWindowWin32.cpp +++ b/src/osgViewer/GraphicsWindowWin32.cpp @@ -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()); }