From e7e2abbb5cf18c218c4d7b2391fba727e0af09d6 Mon Sep 17 00:00:00 2001 From: jules Date: Sun, 23 Feb 2014 13:41:49 +0000 Subject: [PATCH] Avoided an unnecessary call in win32 openGL that may have been causing problems with some Nvidea drivers. --- modules/juce_opengl/native/juce_OpenGL_win32.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/juce_opengl/native/juce_OpenGL_win32.h b/modules/juce_opengl/native/juce_OpenGL_win32.h index fa6f05f724..1bf5bd9e8d 100644 --- a/modules/juce_opengl/native/juce_OpenGL_win32.h +++ b/modules/juce_opengl/native/juce_OpenGL_win32.h @@ -85,7 +85,7 @@ public: void shutdownOnRenderThread() { deactivateCurrentContext(); } static void deactivateCurrentContext() { wglMakeCurrent (0, 0); } - bool makeActive() const noexcept { return wglMakeCurrent (dc, renderContext) != FALSE; } + bool makeActive() const noexcept { return isActive() || wglMakeCurrent (dc, renderContext) != FALSE; } bool isActive() const noexcept { return wglGetCurrentContext() == renderContext; } void swapBuffers() const noexcept { SwapBuffers (dc); }