From 9f97d5c9d1f82d8febd8f3bb6e6b627c35068586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Sun, 21 Jan 2018 14:07:54 +0100 Subject: [PATCH] bugfix for the clickbuttons not working --- .gitignore | 2 +- user/screen.h | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 41ecbc9..9fce4fb 100644 --- a/.gitignore +++ b/.gitignore @@ -16,7 +16,7 @@ esphttpdconfig.mk # Garbage added by CLion .idea/ -cmake-build-debug/ +cmake-build-debug*/ .sass-cache *.map diff --git a/user/screen.h b/user/screen.h index 7169c78..291e623 100644 --- a/user/screen.h +++ b/user/screen.h @@ -124,8 +124,10 @@ enum CursorShape { X(char, font_stack, [TERM_FONTSTACK_LEN], /**/, xget_string, xset_string, TERM_FONTSTACK_LEN, /**/, 1) \ X(u8, font_size, /**/, /**/, xget_dec, xset_u8, NULL, /**/, 1) -#define TERM_BM_N(tc, n) ((tc)->bm1+(TERM_BTN_MSG_LEN*n)) -#define TERM_BTN_N(tc, n) ((tc)->btn1+(TERM_BTN_LEN*n)) +/** Get button N message from the passed config structure pointer */ +#define TERM_BM_N(tc, n) ((tc)->bm1+(TERM_BTN_MSG_LEN*(n))) +/** Get button N text from the passed config structure pointer */ +#define TERM_BTN_N(tc, n) ((tc)->btn1+(TERM_BTN_LEN*(n))) /** Export color for config */ void xget_term_color(char *buff, u32 value);