From c80a3917cb0c2231d368a16b29db37f1aa354cb7 Mon Sep 17 00:00:00 2001 From: spacy51 Date: Sun, 20 Jan 2008 20:16:33 +0000 Subject: [PATCH] WORKAROUND: Input does not work when switching from D3D to OGL --- src/win32/OpenGL.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/win32/OpenGL.cpp b/src/win32/OpenGL.cpp index c314fc6d..224f7c77 100644 --- a/src/win32/OpenGL.cpp +++ b/src/win32/OpenGL.cpp @@ -564,7 +564,11 @@ bool OpenGLDisplay::initializeTexture( int w, int h ) width = w; height = h; - return ( glGetError() == GL_NO_ERROR) ? true : false; + //return ( glGetError() == GL_NO_ERROR) ? true : false; + // Workaround: We usually get GL_INVALID_VALUE, but somehow it works nevertheless + // In consequence, we must not treat it as an error or else the app behaves as if an error occured. + // This in the end results in theApp->input not being created = no input when switching from D3D to OGL + return true; } //turn vsync on or off