all repos — mgba @ 49e66da5c222fd957caf5026f8648ddd3d595f5d

mGBA Game Boy Advance Emulator

3DS: Fix GUIFontPrintf on hardware
Jeffrey Pfau jeffrey@endrift.com
Sun, 23 Aug 2015 19:31:13 -0700
commit

49e66da5c222fd957caf5026f8648ddd3d595f5d

parent

1b78b2133827584224f210d3ae7027e9289cfc04

1 files changed, 8 insertions(+), 6 deletions(-)

jump to
M src/platform/3ds/gui-font.csrc/platform/3ds/gui-font.c

@@ -54,12 +54,14 @@ if (c > 0x7F) {

c = 0; } struct GUIFontGlyphMetric metric = defaultFontMetrics[c]; - sf2d_draw_texture_part_blend(font->tex, x, y - GLYPH_HEIGHT + metric.padding.top, - (c & 15) * CELL_WIDTH + metric.padding.left, - (c >> 4) * CELL_HEIGHT + metric.padding.top, - CELL_WIDTH - (metric.padding.left + metric.padding.right), - CELL_HEIGHT - (metric.padding.top + metric.padding.bottom), - color); + sf2d_draw_texture_part_blend(font->tex, + x - metric.padding.left, + y - GLYPH_HEIGHT, + (c & 15) * CELL_WIDTH, + (c >> 4) * CELL_HEIGHT, + CELL_WIDTH, + CELL_HEIGHT, + color); x += metric.width; } }