early-access version 2847

This commit is contained in:
pineappleEA
2022-07-19 05:48:31 +02:00
parent ba74a2373c
commit 05e3c38e7f
498 changed files with 16027 additions and 27028 deletions

View File

@@ -23,7 +23,6 @@
#endif
#include "SDL_test_common.h"
#include "testutils.h"
#define DEFAULT_PTSIZE 30
#ifdef HAVE_SDL_TTF
@@ -109,7 +108,6 @@ static int unifont_init(const char *fontname)
SDL_RWops *hexFile;
const size_t unifontGlyphSize = UNIFONT_NUM_GLYPHS * sizeof(struct UnifontGlyph);
const size_t unifontTextureSize = UNIFONT_NUM_TEXTURES * state->num_windows * sizeof(void *);
char *filename;
/* Allocate memory for the glyph data so the file can be closed after initialization. */
unifontGlyph = (struct UnifontGlyph *)SDL_malloc(unifontGlyphSize);
@@ -129,13 +127,7 @@ static int unifont_init(const char *fontname)
}
SDL_memset(unifontTexture, 0, unifontTextureSize);
filename = GetResourceFilename(NULL, fontname);
if (filename == NULL) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory\n");
return -1;
}
hexFile = SDL_RWFromFile(filename, "rb");
SDL_free(filename);
hexFile = SDL_RWFromFile(fontname, "rb");
if (hexFile == NULL)
{
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Failed to open font file: %s\n", fontname);