Skip to content

Instantly share code, notes, and snippets.

@blackwolf12333
Last active August 29, 2015 14:16
Show Gist options
  • Save blackwolf12333/c6ff39d2e961c9982465 to your computer and use it in GitHub Desktop.
Save blackwolf12333/c6ff39d2e961c9982465 to your computer and use it in GitHub Desktop.
int main() {
// initialize sdl before this
SDL_Init(SDL_INIT_EVERYTHING);
bool running = true;
while (running) {
while (SDL_PollEvent(&e)){
//If user closes the window
if (e.type == SDL_QUIT){
running = false;
break;
}
}
// do stuff here for every frame
}
SDL_Quit();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment