shithub: m8c

Download patch

ref: 733ca6590b3507aad57b6fc81bc26e7fa536ccd0
parent: c81be0cee7e7a6c4a9f4d7bc65c3ae5f37c7f59d
author: Jonne Kokkonen <jonne.kokkonen@gmail.com>
date: Mon Apr 22 14:31:01 EDT 2024

fix + character and newlines not working

--- a/src/inprint2.c
+++ b/src/inprint2.c
@@ -108,9 +108,9 @@
     s_rect.x = id * s_rect.w;
     s_rect.y = 0;
 #endif
-    if (id == '\n') {
+    if (id + font_offset == '\n') {
       d_rect.x = x;
-      d_rect.y += s_rect.h;
+      d_rect.y += s_rect.h + 1;
       continue;
     }
     if (fgcolor != previous_fgcolor) {
@@ -130,7 +130,7 @@
       SDL_RenderFillRect(dst, &bg_rect);
     }
     SDL_RenderCopy(dst, selected_font, &s_rect, &d_rect);
-    d_rect.x += selected_inline_font->glyph_x;
+    d_rect.x += selected_inline_font->glyph_x + 1;
   }
 }
 SDL_Texture *get_inline_font(void) { return selected_font; }
--