Index: ttf.c =================================================================== --- ttf.c (revision 32846) +++ ttf.c (revision 32847) @@ -451,10 +451,8 @@ ctx->timer_active = 0; } - -static void font_change_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) +static void font_change_timer(ttfgui_ctx_t *ctx, int period) { - ttfgui_ctx_t *ctx = caller_data; rnd_hidval_t hv; if (ctx->timer_active && (rnd_gui->stop_timer != NULL)) @@ -461,11 +459,16 @@ rnd_gui->stop_timer(rnd_gui, ctx->timer); hv.ptr = ctx; - ctx->timer = rnd_gui->add_timer(rnd_gui, font_change_timer_cb, 750, hv); + ctx->timer = rnd_gui->add_timer(rnd_gui, font_change_timer_cb, period, hv); ctx->timer_active = 1; } +static void font_change_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) +{ + font_change_timer(caller_data, 750); +} + static const char pcb_acts_LoadTtf[] = "LoadTtf()"; static const char pcb_acth_LoadTtf[] = "Presents a GUI dialog for interactively loading glyphs from from a ttf file"; fgw_error_t pcb_act_LoadTtf(fgw_arg_t *res, int argc, fgw_arg_t *argv)