From f158617551ad5785e4db116a4bd9ca7e24b8f63a Mon Sep 17 00:00:00 2001 From: Jonathan Adamczewski Date: Sun, 2 Aug 2015 01:35:43 -0700 Subject: [PATCH] Show SDL error message on init failure --- examples/sdl_opengl_example/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/sdl_opengl_example/main.cpp b/examples/sdl_opengl_example/main.cpp index e2d23667..aac9c6a5 100644 --- a/examples/sdl_opengl_example/main.cpp +++ b/examples/sdl_opengl_example/main.cpp @@ -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);