mirror of https://github.com/mgba-emu/mgba.git
Ports: Make substitution character less confusing
This commit is contained in:
parent
b99b680ca2
commit
d357b93285
|
@ -60,7 +60,7 @@ void GUIFontDrawGlyph(const struct GUIFont* font, int glyph_x, int glyph_y, uint
|
|||
ctrActivateTexture(&font->texture);
|
||||
|
||||
if (glyph > 0x7F) {
|
||||
glyph = 0;
|
||||
glyph = '?';
|
||||
}
|
||||
|
||||
struct GUIFontGlyphMetric metric = defaultFontMetrics[glyph];
|
||||
|
|
|
@ -40,14 +40,14 @@ unsigned GUIFontHeight(const struct GUIFont* font) {
|
|||
unsigned GUIFontGlyphWidth(const struct GUIFont* font, uint32_t glyph) {
|
||||
UNUSED(font);
|
||||
if (glyph > 0x7F) {
|
||||
glyph = 0;
|
||||
glyph = '?';
|
||||
}
|
||||
return defaultFontMetrics[glyph].width * 2;
|
||||
}
|
||||
|
||||
void GUIFontDrawGlyph(const struct GUIFont* font, int x, int y, uint32_t color, uint32_t glyph) {
|
||||
if (glyph > 0x7F) {
|
||||
glyph = 0;
|
||||
glyph = '?';
|
||||
}
|
||||
struct GUIFontGlyphMetric metric = defaultFontMetrics[glyph];
|
||||
vita2d_draw_texture_tint_part_scale(font->tex, x, y + (-GLYPH_HEIGHT + metric.padding.top) * 2,
|
||||
|
|
|
@ -48,7 +48,7 @@ unsigned GUIFontHeight(const struct GUIFont* font) {
|
|||
unsigned GUIFontGlyphWidth(const struct GUIFont* font, uint32_t glyph) {
|
||||
UNUSED(font);
|
||||
if (glyph > 0x7F) {
|
||||
glyph = 0;
|
||||
glyph = '?';
|
||||
}
|
||||
return defaultFontMetrics[glyph].width;
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ void GUIFontDrawGlyph(const struct GUIFont* font, int x, int y, uint32_t color,
|
|||
GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGBA, GX_RGBA8, 0);
|
||||
|
||||
if (glyph > 0x7F) {
|
||||
glyph = 0;
|
||||
glyph = '?';
|
||||
}
|
||||
struct GUIFontGlyphMetric metric = defaultFontMetrics[glyph];
|
||||
s16 tx = (glyph & 15) * CELL_WIDTH + metric.padding.left;
|
||||
|
|
Loading…
Reference in New Issue