From 19e3b35d7d016f92a25500fd84829861c1b98092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Sun, 22 Nov 2015 02:08:03 +0700 Subject: [PATCH 1/2] Disable rounding of the icon size, makes the icons blurry in some case, but should also fix positionning bugs on some resolutions --- menu/drivers/xmb.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index ba91fa5437..ed7f739821 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -1883,26 +1883,6 @@ static void xmb_layout(menu_handle_t *menu, xmb_handle_t *xmb) xmb->margins.label.left = 85.0 * scale_factor; xmb->margins.label.top = new_font_size / 3.0; xmb->margins.setting.left = 600.0 * scale_factor; - - if (width >= 3840) - scale_factor = 2.0; - else if (width >= 2560) - scale_factor = 1.5; - else if (width >= 1920) - scale_factor = 1.0; - else if (width >= 1440) - scale_factor = 0.75; - else if (width >= 960) - scale_factor = 0.5; - else if (width >= 640) - scale_factor = 0.375; - else if (width >= 480) - scale_factor = 0.25; - else if (width >= 320) - scale_factor = 0.1875; - else if (width >= 240) - scale_factor = 0.125; - xmb->icon.size = 128.0 * scale_factor; current = selection; From 9b8c8bfd2189a0d930d615ee1884d3ce018e3135 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Sun, 22 Nov 2015 02:10:22 +0700 Subject: [PATCH 2/2] Allow resetting the core associations to N/A with start --- menu/cbs/menu_cbs_start.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/menu/cbs/menu_cbs_start.c b/menu/cbs/menu_cbs_start.c index 00b1b7bd48..be23db0f6d 100644 --- a/menu/cbs/menu_cbs_start.c +++ b/menu/cbs/menu_cbs_start.c @@ -13,6 +13,8 @@ * If not, see . */ +#include + #include "../menu.h" #include "../menu_cbs.h" #include "../menu_input.h" @@ -264,6 +266,32 @@ static int action_start_core_setting(unsigned type, return 0; } +static int action_start_playlist_association(unsigned type, const char *label) +{ + int i, next, found, current = 0; + char core_path[PATH_MAX_LENGTH] = {0}; + char new_playlist_cores[PATH_MAX_LENGTH] = {0}; + global_t *global = global_get_ptr(); + settings_t *settings = config_get_ptr(); + const char *path = path_basename(label); + core_info_list_t *list = global ? global->core_info.list : NULL; + if (!list) + return -1; + + struct string_list *stnames = string_split(settings->playlist_names, ";"); + struct string_list *stcores = string_split(settings->playlist_cores, ";"); + + found = string_list_find_elem(stnames, path); + if (found) + string_list_set(stcores, found-1, "DETECT"); + + string_list_join_concat(new_playlist_cores, sizeof(new_playlist_cores), stcores, ";"); + + strlcpy(settings->playlist_cores, new_playlist_cores, sizeof(settings->playlist_cores)); + + return 0; +} + static int action_start_video_resolution(unsigned type, const char *label) { unsigned width = 0, height = 0; @@ -349,6 +377,10 @@ static int menu_cbs_init_bind_start_compare_type(menu_file_list_cbs_t *cbs, { BIND_ACTION_START(cbs, action_start_performance_counters_frontend); } + else if ((type >= MENU_SETTINGS_PLAYLIST_ASSOCIATION_START)) + { + BIND_ACTION_START(cbs, action_start_playlist_association); + } else if ((type >= MENU_SETTINGS_CORE_OPTION_START)) { BIND_ACTION_START(cbs, action_start_core_setting);