mirror of https://github.com/mgba-emu/mgba.git
3DS: Fix GUIFontPrintf on hardware
This commit is contained in:
parent
1b78b21338
commit
49e66da5c2
|
@ -54,11 +54,13 @@ void GUIFontPrintf(const struct GUIFont* font, int x, int y, enum GUITextAlignme
|
||||||
c = 0;
|
c = 0;
|
||||||
}
|
}
|
||||||
struct GUIFontGlyphMetric metric = defaultFontMetrics[c];
|
struct GUIFontGlyphMetric metric = defaultFontMetrics[c];
|
||||||
sf2d_draw_texture_part_blend(font->tex, x, y - GLYPH_HEIGHT + metric.padding.top,
|
sf2d_draw_texture_part_blend(font->tex,
|
||||||
(c & 15) * CELL_WIDTH + metric.padding.left,
|
x - metric.padding.left,
|
||||||
(c >> 4) * CELL_HEIGHT + metric.padding.top,
|
y - GLYPH_HEIGHT,
|
||||||
CELL_WIDTH - (metric.padding.left + metric.padding.right),
|
(c & 15) * CELL_WIDTH,
|
||||||
CELL_HEIGHT - (metric.padding.top + metric.padding.bottom),
|
(c >> 4) * CELL_HEIGHT,
|
||||||
|
CELL_WIDTH,
|
||||||
|
CELL_HEIGHT,
|
||||||
color);
|
color);
|
||||||
x += metric.width;
|
x += metric.width;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue