From 27de5f3a6ffbdb532b2919698163005755e7a8ba Mon Sep 17 00:00:00 2001 From: Yamagi Burmeister Date: Mon, 4 Jun 2012 13:10:12 +0200 Subject: [PATCH] Fall back to opengl32.dll if the gldriver couldn't be loaded --- src/windows/qgl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/windows/qgl.c b/src/windows/qgl.c index 8463b82a..3b7ab5e5 100644 --- a/src/windows/qgl.c +++ b/src/windows/qgl.c @@ -3683,13 +3683,13 @@ QGL_Init(const char *dllname) { if ((glw_state.hinstOpenGL = LoadLibrary(dllname)) == 0) { - char *buf = NULL; + ri.Con_Printf(PRINT_ALL, "Couldn't load %s, trying hardcoded default opengl32.dll\n", dllname); - FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, - NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPTSTR)&buf, 0, NULL); - ri.Con_Printf(PRINT_ALL, "%s\n", buf); - return false; + if ((glw_state.hinstOpenGL = LoadLibrary("opengl32.dll")) == 0) + { + ri.Con_Printf(PRINT_ALL, "Couldn't load opengl32.dll\n"); + return false; + } } gl_config.allow_cds = true;