comparison src/video/win32/SDL_win32events.c @ 3565:f43c8f688f77

Fixed bug #906 Added better error reporting for OpenGL context creation failing.
author Sam Lantinga <slouken@libsdl.org>
date Tue, 15 Dec 2009 08:11:06 +0000
parents 85bf3f297b5c
children 07c8339c95c6
comparison
equal deleted inserted replaced
3564:d264d99576c1 3565:f43c8f688f77
730 TCHAR buffer[1024]; 730 TCHAR buffer[1024];
731 char *message; 731 char *message;
732 FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), 0, 732 FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), 0,
733 buffer, SDL_arraysize(buffer), NULL); 733 buffer, SDL_arraysize(buffer), NULL);
734 message = WIN_StringToUTF8(buffer); 734 message = WIN_StringToUTF8(buffer);
735 SDL_SetError("%s%s%s", prefix ? prefix : "", prefix ? ":" : "", message); 735 SDL_SetError("%s%s%s", prefix ? prefix : "", prefix ? ": " : "", message);
736 SDL_free(message); 736 SDL_free(message);
737 } 737 }
738 738
739 /* vi: set ts=4 sw=4 expandtab: */ 739 /* vi: set ts=4 sw=4 expandtab: */