From bb5543c2a1b3bd40e446dc17de11d48921f70d63 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 15 Sep 2016 18:50:33 +0200 Subject: [PATCH] Cleanups --- menu/drivers/materialui.c | 5 +---- menu/drivers/rgui.c | 6 ++---- menu/drivers/xmb.c | 5 +---- menu/menu_input.c | 6 ------ menu/menu_input.h | 1 - 5 files changed, 4 insertions(+), 19 deletions(-) diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 805eaba000..e310e10da1 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -845,7 +845,6 @@ static void mui_frame(void *data) unsigned header_height = 0; size_t selection = 0; size_t title_margin = 0; - bool display_kb = false; mui_handle_t *mui = (mui_handle_t*)data; uint64_t *frame_count = video_driver_get_frame_count_ptr(); settings_t *settings = config_get_ptr(); @@ -1204,9 +1203,7 @@ static void mui_frame(void *data) mui_draw_scrollbar(mui, width, height, &grey_bg[0]); - menu_input_ctl(MENU_INPUT_CTL_KEYBOARD_DISPLAY, &display_kb); - - if (display_kb) + if (menu_input_dialog_get_display_kb()) { const char *str = NULL, *label = NULL; menu_input_ctl(MENU_INPUT_CTL_KEYBOARD_BUFF_PTR, &str); diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index 4209a3bfa8..53cbd5e319 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -383,11 +383,11 @@ static void rgui_render(void *data) { menu_animation_ctx_ticker_t ticker; unsigned x, y; - bool display_kb, msg_force; uint16_t hover_color, normal_color; size_t i, end, fb_pitch, old_start; unsigned fb_width, fb_height; int bottom; + bool msg_force = false; uint64_t *frame_count = NULL; char title[256] = {0}; char title_buf[256] = {0}; @@ -609,9 +609,7 @@ static void rgui_render(void *data) entry_selected ? hover_color : normal_color); } - menu_input_ctl(MENU_INPUT_CTL_KEYBOARD_DISPLAY, &display_kb); - - if (display_kb) + if (menu_input_dialog_get_display_kb()) { const char *str = NULL; const char *label = NULL; diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index cfede46cd6..30590114aa 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -2152,7 +2152,6 @@ static void xmb_frame(void *data) char msg[PATH_MAX_LENGTH] = {0}; char title_msg[256] = {0}; char title_truncated[256] = {0}; - bool display_kb = false; bool render_background = false; file_list_t *selection_buf = NULL; file_list_t *menu_stack = NULL; @@ -2365,9 +2364,7 @@ static void xmb_frame(void *data) menu_display_font_flush_block(); - menu_input_ctl(MENU_INPUT_CTL_KEYBOARD_DISPLAY, &display_kb); - - if (display_kb) + if (menu_input_dialog_get_display_kb()) { const char *str = NULL; const char *label = NULL; diff --git a/menu/menu_input.c b/menu/menu_input.c index 8b57d66911..42913762ca 100644 --- a/menu/menu_input.c +++ b/menu/menu_input.c @@ -693,12 +693,6 @@ bool menu_input_ctl(enum menu_input_ctl_state state, void *data) case MENU_INPUT_CTL_UNSET_POINTER_DRAGGED: pointer_dragging = false; break; - case MENU_INPUT_CTL_KEYBOARD_DISPLAY: - { - bool *ptr = (bool*)data; - *ptr = menu_input->keyboard.display; - } - break; case MENU_INPUT_CTL_KEYBOARD_BUFF_PTR: { const char **ptr = (const char**)data; diff --git a/menu/menu_input.h b/menu/menu_input.h index 487dd601e9..dbba03c2e0 100644 --- a/menu/menu_input.h +++ b/menu/menu_input.h @@ -76,7 +76,6 @@ enum menu_input_ctl_state MENU_INPUT_CTL_IS_POINTER_DRAGGED, MENU_INPUT_CTL_SET_POINTER_DRAGGED, MENU_INPUT_CTL_UNSET_POINTER_DRAGGED, - MENU_INPUT_CTL_KEYBOARD_DISPLAY, MENU_INPUT_CTL_KEYBOARD_BUFF_PTR, MENU_INPUT_CTL_KEYBOARD_LABEL, MENU_INPUT_CTL_KEYBOARD_LABEL_SETTING,