Commit fb16cf8c authored by Sam Lantinga's avatar Sam Lantinga

Fixed bug #906

Added better error reporting for OpenGL context creation failing.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404314
parent 9f5a112e
...@@ -732,7 +732,7 @@ WIN_SetError(const char *prefix) ...@@ -732,7 +732,7 @@ WIN_SetError(const char *prefix)
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), 0, FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), 0,
buffer, SDL_arraysize(buffer), NULL); buffer, SDL_arraysize(buffer), NULL);
message = WIN_StringToUTF8(buffer); message = WIN_StringToUTF8(buffer);
SDL_SetError("%s%s%s", prefix ? prefix : "", prefix ? ":" : "", message); SDL_SetError("%s%s%s", prefix ? prefix : "", prefix ? ": " : "", message);
SDL_free(message); SDL_free(message);
} }
......
...@@ -536,7 +536,7 @@ WIN_GL_CreateContext(_THIS, SDL_Window * window) ...@@ -536,7 +536,7 @@ WIN_GL_CreateContext(_THIS, SDL_Window * window)
} }
if (!context) { if (!context) {
SDL_SetError("Could not create GL context"); WIN_SetError("Could not create GL context");
return NULL; return NULL;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment