add event loop

This commit is contained in:
Josh Holtrop 2013-02-02 21:31:37 -05:00
parent 3e09fbb66f
commit 491d6778ad

View File

@ -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;