From 0f98a34e0680609150357fd63e58b0fac0da9e1a Mon Sep 17 00:00:00 2001 From: Aaron Culliney Date: Wed, 9 Dec 2015 22:11:44 -0800 Subject: [PATCH] Refactor naming of user-chosen alternate keyboard --- src/video/gltouchkbd.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/video/gltouchkbd.c b/src/video/gltouchkbd.c index 164676da..bbf0d02e 100644 --- a/src/video/gltouchkbd.c +++ b/src/video/gltouchkbd.c @@ -82,7 +82,7 @@ static uint8_t kbdTemplateAlt[KBD_TEMPLATE_ROWS][KBD_TEMPLATE_COLS+1] = { "$|\\XXX.^XX", }; -static uint8_t kbdTemplateArrow[KBD_TEMPLATE_ROWS][KBD_TEMPLATE_COLS+1] = { +static uint8_t kbdTemplateUserAlt[KBD_TEMPLATE_ROWS][KBD_TEMPLATE_COLS+1] = { "@ @ @ @ @ ", " ", " @ ", @@ -202,13 +202,13 @@ static inline void _switch_keyboard(GLModel *parent, uint8_t *template) { } } -static inline void _toggle_arrows(void) { +static inline void _show_useralt_kbd(void) { GLModelHUDKeyboard *hudKeyboard = (GLModelHUDKeyboard *)kbd.model->custom; uint8_t c = hudKeyboard->tpl[_ROWOFF*(KBD_TEMPLATE_COLS+1)]; if (c == ICONTEXT_NONACTIONABLE) { _switch_keyboard(kbd.model, kbdTemplateUCase[0]); } else { - _switch_keyboard(kbd.model, kbdTemplateArrow[0]); + _switch_keyboard(kbd.model, kbdTemplateUserAlt[0]); } } @@ -360,7 +360,7 @@ static inline int64_t _tap_key_at_point(float x, float y) { case ICONTEXT_MENU_SPROUT: key = 0; - _toggle_arrows(); + _show_useralt_kbd(); break; case ICONTEXT_GOTO: @@ -761,10 +761,10 @@ static void gltouchkbd_loadAltKbd(const char *kbdPath) { const int size = end - start; if (size == 1) { - kbdTemplateArrow[row][col] = parsedData.jsonString[start]; + kbdTemplateUserAlt[row][col] = parsedData.jsonString[start]; continue; } else if (size == 0) { - kbdTemplateArrow[row][col] = ICONTEXT_NONACTIONABLE; + kbdTemplateUserAlt[row][col] = ICONTEXT_NONACTIONABLE; continue; } else if (size < 0) { assert(false && "negative size coming from jsmn!"); @@ -790,7 +790,7 @@ static void gltouchkbd_loadAltKbd(const char *kbdPath) { if (foundMatch) { start = parsedData.jsonTokens[i+1].start; uint8_t ch = (uint8_t)strtol(&parsedData.jsonString[start], NULL, /*base:*/16); - kbdTemplateArrow[row][col] = ch; + kbdTemplateUserAlt[row][col] = ch; break; } } @@ -841,8 +841,8 @@ static void _initialize_keyboard_templates(void) { } for (unsigned int i=0; i