Fixed bug #906
authorSam Lantinga <slouken@libsdl.org>
Tue, 15 Dec 2009 08:11:06 +0000
changeset 3565f43c8f688f77
parent 3564 d264d99576c1
child 3566 07c8339c95c6
Fixed bug #906

Added better error reporting for OpenGL context creation failing.
src/video/win32/SDL_win32events.c
src/video/win32/SDL_win32opengl.c
     1.1 --- a/src/video/win32/SDL_win32events.c	Tue Dec 15 05:34:58 2009 +0000
     1.2 +++ b/src/video/win32/SDL_win32events.c	Tue Dec 15 08:11:06 2009 +0000
     1.3 @@ -732,7 +732,7 @@
     1.4      FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), 0,
     1.5                    buffer, SDL_arraysize(buffer), NULL);
     1.6      message = WIN_StringToUTF8(buffer);
     1.7 -    SDL_SetError("%s%s%s", prefix ? prefix : "", prefix ? ":" : "", message);
     1.8 +    SDL_SetError("%s%s%s", prefix ? prefix : "", prefix ? ": " : "", message);
     1.9      SDL_free(message);
    1.10  }
    1.11  
     2.1 --- a/src/video/win32/SDL_win32opengl.c	Tue Dec 15 05:34:58 2009 +0000
     2.2 +++ b/src/video/win32/SDL_win32opengl.c	Tue Dec 15 08:11:06 2009 +0000
     2.3 @@ -536,7 +536,7 @@
     2.4      }
     2.5  
     2.6      if (!context) {
     2.7 -        SDL_SetError("Could not create GL context");
     2.8 +        WIN_SetError("Could not create GL context");
     2.9          return NULL;
    2.10      }
    2.11