From e907307eb2118ef6f75fa04b26e3cf3d20eb6ced Mon Sep 17 00:00:00 2001 From: rxi Date: Sun, 15 Jun 2014 11:50:04 +0100 Subject: [PATCH] Fixed fonts to not be effected by the current flip mode --- src/font.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/font.c b/src/font.c index 2505756..206f9a5 100644 --- a/src/font.c +++ b/src/font.c @@ -46,6 +46,7 @@ void font_deinit(font_t *self) { extern int image_blendMode; +extern int image_flip; void font_blit(font_t *self, pixel_t *buf, int bufw, int bufh, const char *str, int dx, int dy @@ -58,8 +59,11 @@ void font_blit(font_t *self, pixel_t *buf, int bufw, int bufh, const char *p = str; int x = dx; int y = dy; + int oldBlendMode = image_blendMode; + int oldFlip = image_flip; image_blendMode = IMAGE_COLOR; + image_flip = 0; while (*p) { if (*p == '\n') { @@ -76,6 +80,7 @@ void font_blit(font_t *self, pixel_t *buf, int bufw, int bufh, } image_blendMode = oldBlendMode; + image_flip = oldFlip; }