[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36115] trunk/blender/intern/ghost/intern/ GHOST_WindowWin32.cpp: Fix crash for Intel G45 video cards
Sergey Sharybin
g.ulairi at gmail.com
Tue Apr 12 16:32:00 CEST 2011
Revision: 36115
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36115
Author: nazgul
Date: 2011-04-12 14:31:59 +0000 (Tue, 12 Apr 2011)
Log Message:
-----------
Fix crash for Intel G45 video cards
This video card need a bit different approach to buffer swapping.
Patch provided by nico_ga from IRC.
Modified Paths:
--------------
trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp
Modified: trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp 2011-04-12 14:22:52 UTC (rev 36114)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp 2011-04-12 14:31:59 UTC (rev 36115)
@@ -609,7 +609,12 @@
GHOST_TSuccess GHOST_WindowWin32::swapBuffers()
{
- return ::SwapBuffers(m_hDC) == TRUE ? GHOST_kSuccess : GHOST_kFailure;
+ HDC hDC = m_hDC;
+
+ if (is_crappy_intel_card())
+ hDC = ::wglGetCurrentDC();
+
+ return ::SwapBuffers(hDC) == TRUE ? GHOST_kSuccess : GHOST_kFailure;
}
More information about the Bf-blender-cvs
mailing list