diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-04-12 18:31:59 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-04-12 18:31:59 +0400 |
commit | b3a04b4ea7a3fafa2a748289ed95e941e187ca99 (patch) | |
tree | fda972241a84f775c90ae9b65c4bba89e74688ee /intern | |
parent | a475368deb798a78d851c56d15c9cb2e5a5ce361 (diff) |
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.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowWin32.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index 629338e70d8..5d21edb758d 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -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; } |