Skip to content

Instantly share code, notes, and snippets.

@zrbecker
Created April 1, 2011 15:55
Show Gist options
  • Save zrbecker/898385 to your computer and use it in GitHub Desktop.
Save zrbecker/898385 to your computer and use it in GitHub Desktop.
#include <allegro5/allegro.h>
int main(int argc, char **argv)
{
al_init();
ALLEGRO_DISPLAY *display = al_create_display(640, 480);
ALLEGRO_EVENT_QUEUE *queue = al_create_event_queue();
al_register_event_source(queue, al_get_display_event_source(display));
ALLEGRO_EVENT event;
while (1) {
al_wait_for_event(queue, &event);
if (event.type == ALLEGRO_EVENT_DISPLAY_CLOSE)
break;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment