Skip to content

Commit

Permalink
Merge pull request #563 from kgorecki/sdl_errors
Browse files Browse the repository at this point in the history
A bit more verbose SDL errors
lgtm
Thanks for PR and fixes.
  • Loading branch information
TeslaRus authored Oct 25, 2018
2 parents b9b32ff + 0cad74a commit 31208dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ void Engine_InitSDLVideo()

if(SDL_GL_LoadLibrary(NULL) < 0)
{
Sys_Error("Could not init OpenGL driver");
Sys_Error("Could not init OpenGL driver: %s", SDL_GetError());
}

if(renderer.settings.antialias)
Expand All @@ -382,12 +382,12 @@ void Engine_InitSDLVideo()
sdl_window = SDL_CreateWindow("OpenTomb", screen_info.x, screen_info.y, screen_info.w, screen_info.h, video_flags);
if(!sdl_window)
{
Sys_Error("Could not create SDL window");
Sys_Error("Could not create SDL window: %s", SDL_GetError());
}
sdl_gl_context = SDL_GL_CreateContext(sdl_window);
if(!sdl_gl_context)
{
Sys_Error("Could not create GL context");
Sys_Error("Could not create GL context: %s", SDL_GetError());
}

lglGetString = (PFNGLGETSTRINGPROC)SDL_GL_GetProcAddress("glGetString");
Expand Down

0 comments on commit 31208dd

Please sign in to comment.