diff --git a/sdl_opengl_bare.d b/sdl_opengl_bare.d index cc5ae36..e45554d 100644 --- a/sdl_opengl_bare.d +++ b/sdl_opengl_bare.d @@ -16,13 +16,15 @@ int main(char[][] args) SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); - SDL_Surface *screen; - if ((screen = SDL_SetVideoMode(WIDTH, HEIGHT, 32, SDL_OPENGL)) == null) + SDL_Surface *screen = SDL_SetVideoMode(WIDTH, HEIGHT, 32, SDL_OPENGL); + if (screen == null) { printf("Failed to set video mode!\n"); SDL_Quit(); return 2; } + SDL_Quit(); + return 0; }