update Allegro example

This commit is contained in:
Juraj Michalek
2019-05-06 09:40:58 +02:00
parent c43c3792c0
commit 932107dee7

View File

@@ -18,16 +18,21 @@ int main()
ALLEGRO_EVENT event; ALLEGRO_EVENT event;
ALLEGRO_BITMAP *image; ALLEGRO_BITMAP *image;
al_init(); if(!al_init()) {
al_install_keyboard(); fprintf(stderr, "failed to initialize allegro!\n");
al_init_image_addon(); return -1;
}
display = al_create_display(640, 480); display = al_create_display(640, 480);
if (!display) if (!display)
{ {
fprintf(stderr, "failed to create display!\n");
return 2; return 2;
} }
al_install_keyboard();
al_init_image_addon();
// Create Event queue // Create Event queue
event_queue = al_create_event_queue(); event_queue = al_create_event_queue();