From d357b9328505447b15cd442a89b5e8f54953e455 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sun, 1 Nov 2015 09:17:01 -0800 Subject: [PATCH] Ports: Make substitution character less confusing --- src/platform/3ds/gui-font.c | 2 +- src/platform/psp2/gui-font.c | 4 ++-- src/platform/wii/gui-font.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/platform/3ds/gui-font.c b/src/platform/3ds/gui-font.c index 8ae3fb11e..783092574 100644 --- a/src/platform/3ds/gui-font.c +++ b/src/platform/3ds/gui-font.c @@ -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]; diff --git a/src/platform/psp2/gui-font.c b/src/platform/psp2/gui-font.c index 9e526c129..92145d548 100644 --- a/src/platform/psp2/gui-font.c +++ b/src/platform/psp2/gui-font.c @@ -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, diff --git a/src/platform/wii/gui-font.c b/src/platform/wii/gui-font.c index f48cfed58..65b672b13 100644 --- a/src/platform/wii/gui-font.c +++ b/src/platform/wii/gui-font.c @@ -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;