mirror of
https://github.com/ysoftdevs/cpp-examples.git
synced 2026-01-11 22:40:49 +01:00
update Allegro example
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user