Skip to content

Commit

Permalink
[rtext] Fix default font alpha on Big Endian systems (#4624)
Browse files Browse the repository at this point in the history
* Fix rtext default font alpha on Big Endian

* Endian Indepence
  • Loading branch information
Fancy2209 authored Dec 23, 2024
1 parent 4fc908b commit 7868d60
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/rtext.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down

0 comments on commit 7868d60

Please sign in to comment.