fix linking with allegro primitives, fix header name when installed, update readme

This commit is contained in:
2026-09-22 19:08:40 -05:00
parent 07395f7777
commit a9c82c406d
5 changed files with 23 additions and 8 deletions

View File

@@ -4,7 +4,7 @@
#include "allegro5/internal/aintern.h"
#include "allegro5/internal/aintern_vector.h"
#include "allegro5/allegro_schrift.h"
#include "allegro5/allegro_ttf.h"
#include "allegro5/internal/aintern_font.h"
#include "allegro5/internal/aintern_dtor.h"
#include "allegro5/internal/aintern_system.h"
@@ -48,6 +48,11 @@ ALLEGRO_BITMAP *grow_bitmap(ALLEGRO_BITMAP *bmp, uint16_t add) {
ALLEGRO_FONT *al_load_ttf_font_f(ALLEGRO_FILE *file,
char const *filename, int size, int flags)
{
if (!al_is_primitives_addon_initialized() && !al_init_primitives_addon()) {
ALLEGRO_ERROR("Can't load font %s: primitives couldn't be set up\n", filename);
return NULL;
}
#define CLEANUP free(filebuf); if (gtex) al_destroy_bitmap(gtex); al_set_target_bitmap(tgt)
#define FAIL CLEANUP; return NULL