Prepare textFontLoad for x64
This commit is contained in:
parent
f796a724d1
commit
c0b98ba90e
|
@ -125,9 +125,18 @@ int textFontLoad(int font)
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (fileRead(textFontDescriptor, sizeof(TextFontDescriptor), 1, stream) != 1) {
|
||||
goto out;
|
||||
}
|
||||
// NOTE: Original code reads entire descriptor in one go. This does not work
|
||||
// in x64 because of the two pointers.
|
||||
|
||||
if (fileRead(&(textFontDescriptor->glyphCount), 4, 1, stream) != 1) goto out;
|
||||
if (fileRead(&(textFontDescriptor->lineHeight), 4, 1, stream) != 1) goto out;
|
||||
if (fileRead(&(textFontDescriptor->letterSpacing), 4, 1, stream) != 1) goto out;
|
||||
|
||||
int glyphsPtr;
|
||||
if (fileRead(&glyphsPtr, 4, 1, stream) != 1) goto out;
|
||||
|
||||
int dataPtr;
|
||||
if (fileRead(&dataPtr, 4, 1, stream) != 1) goto out;
|
||||
|
||||
textFontDescriptor->glyphs = (TextFontGlyph*)internal_malloc(textFontDescriptor->glyphCount * sizeof(TextFontGlyph));
|
||||
if (textFontDescriptor->glyphs == NULL) {
|
||||
|
|
Loading…
Reference in New Issue