Browse Source

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

* Fix rtext default font alpha on Big Endian

* Endian Indepence
pull/4635/head
Fancy2209 1 month ago
committed by GitHub
parent
commit
7868d600f4
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      src/rtext.c

+ 5
- 1
src/rtext.c View File

@ -247,7 +247,11 @@ extern void LoadFontDefault(void)
// we must consider data as little-endian order (alpha + gray)
((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++;

Loading…
Cancel
Save