]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/glcanvas.cpp
set resolution of print preview from print data (modified patch 1851381)
[wxWidgets.git] / src / msw / glcanvas.cpp
index a95e48a54be6981ccbb149ff1fab0368433f4acb..2c5406e2fda528c42daf3e15da63f49626543884 100644 (file)
@@ -200,12 +200,14 @@ wxGLContext::~wxGLContext()
     wglDeleteContext(m_glContext);
 }
 
-void wxGLContext::SetCurrent(const wxGLCanvas& win) const
+bool wxGLContext::SetCurrent(const wxGLCanvas& win) const
 {
     if ( !wglMakeCurrent(win.GetHDC(), m_glContext) )
     {
         wxLogLastError(_T("wglMakeCurrent"));
+        return false;
     }
+    return true;
 }
 
 // ============================================================================
@@ -313,10 +315,14 @@ bool wxGLCanvas::Create(wxWindow *parent,
 // operations
 // ----------------------------------------------------------------------------
 
-void wxGLCanvas::SwapBuffers()
+bool wxGLCanvas::SwapBuffers()
 {
     if ( !::SwapBuffers(m_hDC) )
+    {
+        return false;
         wxLogLastError(_T("SwapBuffers"));
+    }
+    return true;
 }
 
 // ----------------------------------------------------------------------------