1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-05 09:48:42 +00:00

Hide UI Companion menu items when they are not available (#13807)

This commit is contained in:
sonninnos 2022-04-13 15:50:33 +03:00 committed by GitHub
parent 0a9ea2da4d
commit c185c3b916
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -8198,10 +8198,12 @@ unsigned menu_displaylist_build_list(
{MENU_ENUM_LABEL_POINTER_ENABLE, PARSE_ONLY_BOOL, true},
{MENU_ENUM_LABEL_THREADED_DATA_RUNLOOP_ENABLE, PARSE_ONLY_BOOL, true},
{MENU_ENUM_LABEL_VIDEO_DISABLE_COMPOSITION, PARSE_ONLY_BOOL, true},
#if defined(HAVE_QT) || defined(HAVE_COCOA)
{MENU_ENUM_LABEL_UI_COMPANION_ENABLE, PARSE_ONLY_BOOL, true},
{MENU_ENUM_LABEL_UI_COMPANION_START_ON_BOOT, PARSE_ONLY_BOOL, true},
{MENU_ENUM_LABEL_DESKTOP_MENU_ENABLE, PARSE_ONLY_BOOL, true},
{MENU_ENUM_LABEL_UI_COMPANION_TOGGLE, PARSE_ONLY_BOOL, false},
{MENU_ENUM_LABEL_DESKTOP_MENU_ENABLE, PARSE_ONLY_BOOL, true},
#endif
{MENU_ENUM_LABEL_VIDEO_3DS_DISPLAY_MODE, PARSE_ONLY_UINT, true},
{MENU_ENUM_LABEL_VIDEO_3DS_LCD_BOTTOM, PARSE_ONLY_BOOL, true},
};
@ -8229,10 +8231,12 @@ unsigned menu_displaylist_build_list(
build_list[i].checked = true;
break;
#endif
#if defined(HAVE_QT) || defined(HAVE_COCOA)
case MENU_ENUM_LABEL_UI_COMPANION_TOGGLE:
if (desktop_menu_enable)
build_list[i].checked = true;
break;
#endif
default:
break;
}

View File

@ -18782,6 +18782,7 @@ static bool setting_append_list(
(*list)[list_info->index - 1].offset_by = 1;
menu_settings_list_current_add_range(list, list_info, 1, 999, 1, true, true);
#if defined(HAVE_QT) || defined(HAVE_COCOA)
CONFIG_BOOL(
list, list_info,
&settings->bools.ui_companion_enable,
@ -18812,8 +18813,6 @@ static bool setting_append_list(
general_read_handler,
SD_FLAG_ADVANCED);
#ifdef HAVE_QT
CONFIG_BOOL(
list, list_info,
&settings->bools.desktop_menu_enable,