X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=gtest_sdl_main.cpp;fp=gtest_sdl_main.cpp;h=fa3a835cda7f167e00b199535a68d28ae23ec0f2;hp=21c923aa755a185e98ea5b9c817e024df750d223;hb=e2962f03fe8fb0b1c47be56eca26761da97453a0;hpb=ad27ef8410ceeabbadd57ace746867f04337844b diff --git a/gtest_sdl_main.cpp b/gtest_sdl_main.cpp index 21c923a..fa3a835 100644 --- a/gtest_sdl_main.cpp +++ b/gtest_sdl_main.cpp @@ -5,7 +5,10 @@ int main(int argc, char **argv) { // Set up an OpenGL context using SDL. - SDL_Init(SDL_INIT_VIDEO); + if (SDL_Init(SDL_INIT_VIDEO) == -1) { + fprintf(stderr, "SDL_Init failed: %s\n", SDL_GetError()); + exit(1); + } SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 0); SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 0); SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);