[rtext] Fix default font alpha on Big Endian systems (#4624)

* Fix rtext default font alpha on Big Endian

* Endian Indepence
This commit is contained in:
Fancy2209 2024-12-23 20:25:22 -01:00 committed by GitHub
parent 4fc908b38f
commit 7868d600f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -247,7 +247,11 @@ extern void LoadFontDefault(void)
// we must consider data as little-endian order (alpha + gray) // we must consider data as little-endian order (alpha + gray)
((unsigned short *)imFont.data)[i + j] = 0xffff; ((unsigned short *)imFont.data)[i + j] = 0xffff;
} }
else ((unsigned short *)imFont.data)[i + j] = 0x00ff; else
{
((unsigned char *)imFont.data)[(i + j)*sizeof(short)] = 0xFF;
((unsigned char *)imFont.data)[(i + j)*sizeof(short) + 1] = 0x00;
}
} }
counter++; counter++;