X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=gtest_sdl_main.cpp;h=39027e6be3246f75fae37a09d333859920ff539b;hp=4a1c74762445522b7ac02e012008c247db404a00;hb=968ceb4cc1714e745b3f6425b57611864823f444;hpb=1727b0714398fc4f318048d457a35ca58bc30b59 diff --git a/gtest_sdl_main.cpp b/gtest_sdl_main.cpp index 4a1c747..39027e6 100644 --- a/gtest_sdl_main.cpp +++ b/gtest_sdl_main.cpp @@ -1,9 +1,19 @@ +#define GTEST_HAS_EXCEPTIONS 0 + #include +#include +#include +#include +#include + #include "gtest/gtest.h" 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);