Show SDL error message on init failure

This commit is contained in:
Jonathan Adamczewski 2015-08-02 01:35:43 -07:00
parent 1e76c63bb6
commit f158617551

View File

@ -10,7 +10,10 @@ int main(int, char**)
{
// Setup SDL
if (SDL_Init(SDL_INIT_EVERYTHING) != 0)
{
printf("Error: %s", SDL_GetError());
return -1;
}
// Setup window
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);