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_BITMAP *image;
al_init();
al_install_keyboard();
al_init_image_addon();
if(!al_init()) {
fprintf(stderr, "failed to initialize allegro!\n");
return -1;
}
display = al_create_display(640, 480);
if (!display)
{
fprintf(stderr, "failed to create display!\n");
return 2;
}
al_install_keyboard();
al_init_image_addon();
// Create Event queue
event_queue = al_create_event_queue();