diff --git a/gfx/video_filter.c b/gfx/video_filter.c index 1fa0591b63..ed15e56abd 100644 --- a/gfx/video_filter.c +++ b/gfx/video_filter.c @@ -136,7 +136,7 @@ static bool create_softfilter_graph(rarch_softfilter_t *filt, softfilter_simd_mask_t cpu_features, unsigned threads) { - unsigned input_fmts, input_fmt, output_fmts, i = 0; + unsigned input_fmts, input_fmt, output_fmts; struct config_file_userdata userdata; char key[64], name[64]; name[0] = '\0'; @@ -236,9 +236,9 @@ static bool create_softfilter_graph(rarch_softfilter_t *filt, #ifdef HAVE_THREADS if (filt->threads > 1) { - filt->thread_data = (struct filter_thread_data*) - calloc(threads, sizeof(*filt->thread_data)); - if (!filt->thread_data) + unsigned i; + if (!(filt->thread_data = (struct filter_thread_data*) + calloc(threads, sizeof(*filt->thread_data)))) return false; for (i = 0; i < threads; i++) diff --git a/menu/cbs/menu_cbs_left.c b/menu/cbs/menu_cbs_left.c index 5f048e963a..d3d280817b 100644 --- a/menu/cbs/menu_cbs_left.c +++ b/menu/cbs/menu_cbs_left.c @@ -252,27 +252,14 @@ static int action_left_scroll(unsigned type, const char *label, return 0; } -static int action_left_goto_tab(void) -{ - struct menu_state *menu_st = menu_state_get_ptr(); - menu_list_t *menu_list = menu_st->entries.list; - file_list_t *selection_buf = menu_list ? MENU_LIST_GET_SELECTION(menu_list, 0) : NULL; - - if (menu_st->driver_ctx && menu_st->driver_ctx->list_cache) - menu_st->driver_ctx->list_cache(menu_st->userdata, - MENU_LIST_HORIZONTAL, MENU_ACTION_LEFT); - return menu_driver_deferred_push_content_list(selection_buf); -} - static int action_left_mainmenu(unsigned type, const char *label, bool wraparound) { +#ifdef HAVE_XMB struct menu_state *menu_st = menu_state_get_ptr(); const menu_ctx_driver_t *driver_ctx = menu_st->driver_ctx; - const char *menu_ident = (driver_ctx && driver_ctx->ident) ? driver_ctx->ident : NULL; size_t size = (driver_ctx && driver_ctx->list_get_size) ? driver_ctx->list_get_size(menu_st->userdata, MENU_LIST_PLAIN) : 0; - -#ifdef HAVE_XMB + const char *menu_ident = (driver_ctx && driver_ctx->ident) ? driver_ctx->ident : NULL; /* Tab switching functionality only applies * to XMB */ if ( (size == 1) @@ -282,7 +269,15 @@ static int action_left_mainmenu(unsigned type, const char *label, bool menu_nav_wraparound_enable = settings->bools.menu_navigation_wraparound_enable; size_t selection = (driver_ctx && driver_ctx->list_get_selection) ? driver_ctx->list_get_selection(menu_st->userdata) : 0; if ((selection != 0) || menu_nav_wraparound_enable) - return action_left_goto_tab(); + { + menu_list_t *menu_list = menu_st->entries.list; + file_list_t *selection_buf = menu_list ? MENU_LIST_GET_SELECTION(menu_list, 0) : NULL; + + if (menu_st->driver_ctx && menu_st->driver_ctx->list_cache) + menu_st->driver_ctx->list_cache(menu_st->userdata, + MENU_LIST_HORIZONTAL, MENU_ACTION_LEFT); + return menu_driver_deferred_push_content_list(selection_buf); + } } else #endif diff --git a/menu/cbs/menu_cbs_right.c b/menu/cbs/menu_cbs_right.c index a4725074f5..94795ed8e4 100644 --- a/menu/cbs/menu_cbs_right.c +++ b/menu/cbs/menu_cbs_right.c @@ -281,26 +281,14 @@ static int audio_mixer_stream_volume_right(unsigned type, const char *label, } #endif -static int action_right_goto_tab(void) -{ - struct menu_state *menu_st = menu_state_get_ptr(); - menu_list_t *menu_list = menu_st->entries.list; - file_list_t *selection_buf = menu_list ? MENU_LIST_GET_SELECTION(menu_list, 0) : NULL; - if (menu_st->driver_ctx && menu_st->driver_ctx->list_cache) - menu_st->driver_ctx->list_cache(menu_st->userdata, - MENU_LIST_HORIZONTAL, MENU_ACTION_RIGHT); - return menu_driver_deferred_push_content_list(selection_buf); -} - static int action_right_mainmenu(unsigned type, const char *label, bool wraparound) { +#ifdef HAVE_XMB struct menu_state *menu_st = menu_state_get_ptr(); const menu_ctx_driver_t *driver_ctx = menu_st->driver_ctx; const char *menu_ident = (driver_ctx && driver_ctx->ident) ? driver_ctx->ident : NULL; size_t size = (driver_ctx && driver_ctx->list_get_size) ? driver_ctx->list_get_size(menu_st->userdata, MENU_LIST_PLAIN) : 0; - -#ifdef HAVE_XMB /* Tab switching functionality only applies * to XMB */ if ( (size == 1) @@ -321,7 +309,14 @@ static int action_right_mainmenu(unsigned type, const char *label, if ( (selection != (horiz_size + tabs_size)) || menu_nav_wraparound_enable) - return action_right_goto_tab(); + { + menu_list_t *menu_list = menu_st->entries.list; + file_list_t *selection_buf = menu_list ? MENU_LIST_GET_SELECTION(menu_list, 0) : NULL; + if (menu_st->driver_ctx && menu_st->driver_ctx->list_cache) + menu_st->driver_ctx->list_cache(menu_st->userdata, + MENU_LIST_HORIZONTAL, MENU_ACTION_RIGHT); + return menu_driver_deferred_push_content_list(selection_buf); + } } else #endif