diff --git a/sdl_opengl_bare.d b/sdl_opengl_bare.d index e45554d..1c0fbe6 100644 --- a/sdl_opengl_bare.d +++ b/sdl_opengl_bare.d @@ -24,6 +24,18 @@ int main(char[][] args) return 2; } + SDL_Event event; + while (SDL_WaitEvent(&event)) + { + if (event.type == SDL_QUIT) + break; + else if (event.type == SDL_KEYDOWN) + { + if (event.key.keysym.sym == SDLK_ESCAPE) + break; + } + } + SDL_Quit(); return 0;