Mercurial > hg > dmlib
changeset 2104:1edf494226c6
Copy surface attributes in dmGetBMGlyph().
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 29 Apr 2019 13:46:50 +0300 |
parents | 78a9140f02b1 |
children | eebe338b3c39 |
files | src/dmtext.h |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dmtext.h Wed Apr 03 20:59:36 2019 +0300 +++ b/src/dmtext.h Mon Apr 29 13:46:50 2019 +0300 @@ -82,6 +82,8 @@ if (ch < 0 || ch >= font->nglyphs || ch == '\n' || ch == '\r') ch = 32; + memcpy(surf, font->glyphs, sizeof(SDL_Surface)); + glyph = &font->glyphMap[ch]; surf->w = glyph->width; surf->h = glyph->height;