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.
This commit is contained in:
Sergey Sharybin 2011-04-12 14:31:59 +00:00
parent a475368deb
commit b3a04b4ea7

@ -609,7 +609,12 @@ GHOST_TSuccess GHOST_WindowWin32::setOrder(GHOST_TWindowOrder order)
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;
}