(Android) (Nvidia Shield Portable) Some kind of edge case happens

on Shield Portable that causes it to keep allocating for a long
time until it simply fails and falls back to the bitmap font
renderer. Currently seems to be happening on character 160.
Quick hack until we fix the real underlying issue.
This commit is contained in:
twinaphex 2015-07-17 11:03:15 +02:00
parent a06dd9c3a2
commit f7a443b4e9

View File

@ -94,13 +94,16 @@ alloc_atlas:
/* make sure important characters fit */
if (isprint(i) && !isspace(i) && (!g->width || !g->height))
{
/* increase atlas by 20% in all directions */
self->atlas.width *= 1.2;
self->atlas.height *= 1.2;
if (i != 160)
{
/* increase atlas by 20% in all directions */
self->atlas.width *= 1.2;
self->atlas.height *= 1.2;
free(self->atlas.buffer);
goto alloc_atlas;
break;
free(self->atlas.buffer);
goto alloc_atlas;
break;
}
}
}