# HG changeset patch # User Michael Pavone # Date 1470808475 25200 # Node ID 3a0f684891ae67bb5d1481327c81d2222af1b7b2 # Parent 0eb4264c2287415d59c628ca52e5ee2b39ac404a Fix NOGL compile option diff -r 0eb4264c2287 -r 3a0f684891ae render_sdl.c --- a/render_sdl.c Tue Aug 09 22:49:32 2016 -0700 +++ b/render_sdl.c Tue Aug 09 22:54:35 2016 -0700 @@ -279,10 +279,12 @@ SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5); SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 0); SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); +#endif main_window = SDL_CreateWindow(title, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, flags); if (!main_window) { fatal_error("Unable to create SDL window: %s\n", SDL_GetError()); } +#ifndef DISABLE_OPENGL main_context = SDL_GL_CreateContext(main_window); GLenum res = glewInit(); if (res != GLEW_OK) { @@ -313,8 +315,8 @@ } main_renderer = SDL_CreateRenderer(main_window, -1, flags); - if (!main_window || !main_renderer) { - fatal_error("unable to create SDL window: %s\n", SDL_GetError()); + if (!main_renderer) { + fatal_error("unable to create SDL renderer: %s\n", SDL_GetError()); } main_clip.x = main_clip.y = 0; main_clip.w = width;