Initialize the primitives addon.

This commit is contained in:
Nicolás Ortega Froysa 2018-03-25 16:42:00 +02:00
parent fb023194e3
commit 86159b0b69
No known key found for this signature in database
GPG Key ID: FEC70E3BAE2E69BF

View File

@ -25,6 +25,7 @@ int redraw;
#include <stdio.h>
#include <allegro5/allegro.h>
#include <allegro5/allegro_primitives.h>
int main() {
printf("SpaceShipSim v%s\n", VERSION);
@ -34,6 +35,11 @@ int main() {
fprintf(stderr, "alleg5: failed to initialize Allegro.\n");
return 1;
}
if(!al_init_primitives_addon())
{
fprintf(stderr, "alleg5: failed to initialize primitives addon.\n");
return 1;
}
if(!create_display(800, 600))
{
fprintf(stderr, "alleg5: failed to create display.\n");
@ -72,6 +78,7 @@ int main() {
evnt_mngr_deinit();
destroy_display();
al_shutdown_primitives_addon();
return 0;
}