early-access version 2847
This commit is contained in:
10
externals/SDL/test/testime.c
vendored
10
externals/SDL/test/testime.c
vendored
@@ -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);
|
||||
|
Reference in New Issue
Block a user