From 2a430c0dc04f7c2dbc39a64c6dfc5903cf04241b Mon Sep 17 00:00:00 2001 From: Pere Pujal i Carabantes Date: Tue, 5 May 2020 00:24:42 +0200 Subject: [PATCH] Undeffing FORKED_FONTS seems to improve things on Android. The system onscreen keyboard hid the progress bar, don't show it until fonts are already in place. --- src/fonts.h | 4 +++- src/tuxpaint.c | 15 +++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/fonts.h b/src/fonts.h index e2f7ca7ad..5e688f0ca 100644 --- a/src/fonts.h +++ b/src/fonts.h @@ -34,7 +34,9 @@ #ifdef __APPLE__ #undef FORKED_FONTS #endif - +#ifdef __ANDROID__ +#undef FORKED_FONTS +#endif #include "SDL.h" #include "SDL_ttf.h" diff --git a/src/tuxpaint.c b/src/tuxpaint.c index 4f1cdd044..9a1299b48 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -3295,13 +3295,6 @@ static void mainloop(void) SDL_BlitSurface(kbd->surface, &kbd->rect, screen, &kbd_rect); update_screen_rect(&kbd_rect); } - - if (onscreen_keyboard && !kbd) - { - r_tir.y = (float)event.button.y / render_scale; - SDL_SetTextInputRect(&r_tir); - SDL_StartTextInput(); - } if (!font_thread_done) { draw_colors(COLORSEL_DISABLE); @@ -3329,6 +3322,12 @@ static void mainloop(void) set_label_fonts(); do_setcursor(cursor_arrow); } + if (onscreen_keyboard && !kbd) + { + r_tir.y = (float)event.button.y / render_scale; + SDL_SetTextInputRect(&r_tir); + SDL_StartTextInput(); + } draw_tux_text(tool_tux[cur_tool], tool_tips[cur_tool], 1); if (num_font_families > 0) @@ -24450,7 +24449,7 @@ static void setup(void) #ifdef FORKED_FONTS reliable_write(font_socket_fd, &no_system_fonts, sizeof no_system_fonts); #else - font_thread = SDL_CreateThread(load_user_fonts_stub, NULL); + font_thread = SDL_CreateThread(load_user_fonts_stub, "font_thread", NULL); #endif /* continuing on with the rest of the cursors... */