Texture cache fix.
This commit is contained in:
parent
b6616c23de
commit
84e0b88d00
|
@ -41,7 +41,7 @@ typedef struct {
|
|||
} PointF;
|
||||
|
||||
struct Texture {
|
||||
char name[MAX_NAME_LENGTH];
|
||||
char name[MAX_DESCRIPTION_LENGTH];
|
||||
long hash;
|
||||
SDL_Texture *texture;
|
||||
Texture *next;
|
||||
|
|
|
@ -48,7 +48,7 @@ static void addTextureToCache(char *name, SDL_Texture *texture)
|
|||
new = malloc(sizeof(Texture));
|
||||
memset(new, 0, sizeof(Texture));
|
||||
|
||||
STRNCPY(new->name, name, MAX_NAME_LENGTH);
|
||||
STRNCPY(new->name, name, MAX_DESCRIPTION_LENGTH);
|
||||
new->texture = texture;
|
||||
|
||||
t->next = new;
|
||||
|
@ -84,6 +84,8 @@ SDL_Texture *getTexture(char *filename)
|
|||
}
|
||||
}
|
||||
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_DEBUG, "%s not in texture cache", filename);
|
||||
|
||||
return loadTexture(filename);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue