Merge pull request #7088 from alfrix/xmb_exp

XMB add an option to show desktop ui aka WIMP
This commit is contained in:
Twinaphex 2018-08-19 15:55:38 +02:00 committed by GitHub
commit e6576c8239
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 112 additions and 48 deletions

View File

@ -21,6 +21,8 @@
- MENU/QT/WIMP: Initial grid view.
- MENU/QT/WIMP: Drag&drop to add new playlist items, add option to add/edit/delete playlists.
- MENU/QT/WIMP: Add menu option to update RetroArch (Windows only for now).
- MENU/XMB: Add new icons for the settings
- MENU/XMB: Add an option to show the desktop ui
- METAL: Initial work-in-progress video driver for Metal. macOS-only right now, and currently requires macOS 10.13.
- METAL: Supports XMB/MaterialUI, has a menu display driver. Has a font rendering driver.
- METAL/SLANG: Slang shaders should be compatible with Metal video driver.
@ -91,7 +93,7 @@ video drivers that implement it (D3D8/9/10/11/12/GL)
- MENU/RGUI: D3D8/D3D9: Hookup Menu Linear Filter
- MENU/XMB: Disable XMB shadow icons by default for PowerPC and ARM for performance reasons.
- MENU/XMB: Left/right thumbnails are now automatically scaled according to layout.
- MENU/XMB: Add Left Thumbnails (additional to the right).
- MENU/XMB: Add Left Thumbnails (additional to the right).
- MENU/XMB: Fixed left/right tab regression.
- MENU/XMB: Fix scaling of tall images that were cut on bottom previously.
- MENU/XMB: Menu scale factor setting now changes texts length, image scaling and margins.

View File

@ -6417,6 +6417,14 @@ MSG_HASH(
"<li>reiniciar RetroArch si actualizaste algo con el \"Actualizador en línea\"</li></ul>\n"
"Por último, el contenido debe coincidir las bases de datos existente de <a href=\"https://docs.libretro.com/guides/roms-playlists-thumbnails/#sources\">aquí</a>. Si aún no funciona, considere <a href=\"https://www.github.com/libretro/RetroArch/issues\">enviar un reporte de error.</a>"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SHOW_WIMP,
"Mostrar el menú de escritorio"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_SHOW_WIMP,
"Abre el menú de escritorio si fue cerrado"
)
#endif
MSG_HASH(
MENU_ENUM_LABEL_VALUE_QT_DONT_SHOW_AGAIN,

View File

@ -3839,6 +3839,14 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_SCAN_FINISHED,
"<li>have \"Databases\" updated via Online Updater</li>\n"
"<li>restart RetroArch if any of the above was just done</li></ul>\n"
"Finally, the content must match existing databases from <a href=\"https://docs.libretro.com/guides/roms-playlists-thumbnails/#sources\">here</a>. If it is still not working, consider <a href=\"https://www.github.com/libretro/RetroArch/issues\">submitting a bug report</a>.")
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SHOW_WIMP,
"Show Desktop Menu"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_SHOW_WIMP,
"Opens the desktop menu if it was closed"
)
#endif
MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_DONT_SHOW_AGAIN,
"Don't show this again")

View File

@ -88,6 +88,9 @@ enum
ACTION_OK_SET_PATH_VIDEO_FILTER,
ACTION_OK_SET_PATH_OVERLAY,
ACTION_OK_SET_DIRECTORY,
#ifdef HAVE_QT
ACTION_OK_SHOW_WIMP,
#endif
ACTION_OK_LOAD_CHEAT_FILE_APPEND
};
@ -820,11 +823,11 @@ int generic_action_ok_displaylist_push(const char *path,
case ACTION_OK_DL_DEFERRED_CORE_LIST_SET:
info.directory_ptr = idx;
menu->scratchpad.unsigned_var = (unsigned)idx;
info_path =
info_path =
settings->paths.directory_libretro;
info_label = msg_hash_to_str(
MENU_ENUM_LABEL_DEFERRED_CORE_LIST_SET);
info.enum_idx =
info.enum_idx =
MENU_ENUM_LABEL_DEFERRED_CORE_LIST_SET;
dl_type = DISPLAYLIST_GENERIC;
break;
@ -1525,7 +1528,7 @@ static int action_ok_file_load(const char *path,
if (filebrowser_get_type() == FILEBROWSER_SELECT_FILE_SUBSYSTEM)
{
/* TODO/FIXME - this path is triggered when we try to load a
/* TODO/FIXME - this path is triggered when we try to load a
* file from an archive while inside the load subsystem
* action */
menu_handle_t *menu = NULL;
@ -1676,7 +1679,7 @@ static int action_ok_playlist_entry_collection(const char *path,
core_info.inf->display_name,
NULL,
NULL);
}
}
else
strlcpy(new_core_path, core_path, sizeof(new_core_path));
@ -1750,7 +1753,7 @@ static int action_ok_playlist_entry(const char *path,
core_info.inf->display_name,
NULL,
NULL);
}
else if (!string_is_empty(core_path))
strlcpy(new_core_path, core_path, sizeof(new_core_path));
@ -1813,9 +1816,9 @@ static int action_ok_playlist_entry_start_content(const char *path,
if (!core_info_find(&core_info, new_core_path))
found_associated_core = false;
/* TODO: figure out if this should refer to
/* TODO: figure out if this should refer to
* the inner or outer entry_path. */
/* TODO: make sure there's only one entry_path
/* TODO: make sure there's only one entry_path
* in this function. */
if (!found_associated_core)
return action_ok_file_load_with_detect_core(entry_path,
@ -2111,7 +2114,7 @@ static void menu_input_st_string_cb_rename_entry(void *userdata,
NULL);
}
menu_input_dialog_end();
}
@ -2719,7 +2722,7 @@ static int action_ok_cheat_add_bottom(const char *path,
cheat_manager_realloc(new_size, CHEAT_HANDLER_TYPE_RETRO);
msg[0] = '\0';
strlcpy(msg,
strlcpy(msg,
msg_hash_to_str(MSG_CHEAT_ADD_BOTTOM_SUCCESS), sizeof(msg));
msg[sizeof(msg) - 1] = 0;
@ -3167,7 +3170,6 @@ static void cb_generic_dir_download(void *task_data,
void *user_data, const char *err)
{
file_transfer_t *transf = (file_transfer_t*)user_data;
if (transf)
{
generic_action_ok_network(transf->path, transf->path, 0, 0, 0,
@ -3521,15 +3523,17 @@ int (func_name)(const char *path, const char *label, unsigned type, size_t idx,
return generic_action_ok_command(cmd); \
}
default_action_ok_cmd_func(action_ok_cheat_apply_changes,CMD_EVENT_CHEATS_APPLY)
default_action_ok_cmd_func(action_ok_quit, CMD_EVENT_QUIT)
default_action_ok_cmd_func(action_ok_save_new_config, CMD_EVENT_MENU_SAVE_CONFIG)
default_action_ok_cmd_func(action_ok_resume_content, CMD_EVENT_RESUME)
default_action_ok_cmd_func(action_ok_restart_content, CMD_EVENT_RESET)
default_action_ok_cmd_func(action_ok_screenshot, CMD_EVENT_TAKE_SCREENSHOT)
default_action_ok_cmd_func(action_ok_disk_cycle_tray_status, CMD_EVENT_DISK_EJECT_TOGGLE )
default_action_ok_cmd_func(action_ok_shader_apply_changes, CMD_EVENT_SHADERS_APPLY_CHANGES )
default_action_ok_cmd_func(action_ok_cheat_apply_changes, CMD_EVENT_CHEATS_APPLY)
default_action_ok_cmd_func(action_ok_quit, CMD_EVENT_QUIT)
default_action_ok_cmd_func(action_ok_save_new_config, CMD_EVENT_MENU_SAVE_CONFIG)
default_action_ok_cmd_func(action_ok_resume_content, CMD_EVENT_RESUME)
default_action_ok_cmd_func(action_ok_restart_content, CMD_EVENT_RESET)
default_action_ok_cmd_func(action_ok_screenshot, CMD_EVENT_TAKE_SCREENSHOT)
default_action_ok_cmd_func(action_ok_disk_cycle_tray_status, CMD_EVENT_DISK_EJECT_TOGGLE)
default_action_ok_cmd_func(action_ok_shader_apply_changes, CMD_EVENT_SHADERS_APPLY_CHANGES)
#ifdef HAVE_QT
default_action_ok_cmd_func(action_ok_show_wimp, CMD_EVENT_UI_COMPANION_TOGGLE)
#endif
static int action_ok_reset_core_association(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
@ -3944,7 +3948,7 @@ void netplay_refresh_rooms_menu(file_list_t *list)
char country[PATH_MAX_LENGTH] = {0};
if (*netplay_room_list[i].country)
string_add_between_pairs(country, netplay_room_list[i].country,
string_add_between_pairs(country, netplay_room_list[i].country,
sizeof(country));
/* Uncomment this to debug mismatched room parameters*/
@ -4739,6 +4743,11 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_XMB_MAIN_MENU_ENABLE_SETTINGS:
BIND_ACTION_OK(cbs, action_ok_enable_settings);
break;
#ifdef HAVE_QT
case MENU_ENUM_LABEL_SHOW_WIMP:
BIND_ACTION_OK(cbs, action_ok_show_wimp);
break;
#endif
case MENU_ENUM_LABEL_QUIT_RETROARCH:
BIND_ACTION_OK(cbs, action_ok_quit);
break;

View File

@ -461,7 +461,9 @@ default_sublabel_macro(action_bind_sublabel_midi_output,
default_sublabel_macro(action_bind_sublabel_midi_volume, MENU_ENUM_SUBLABEL_MIDI_VOLUME)
default_sublabel_macro(action_bind_sublabel_onscreen_overlay_settings_list, MENU_ENUM_SUBLABEL_ONSCREEN_OVERLAY_SETTINGS)
default_sublabel_macro(action_bind_sublabel_onscreen_notifications_settings_list, MENU_ENUM_SUBLABEL_ONSCREEN_NOTIFICATIONS_SETTINGS)
#ifdef HAVE_QT
default_sublabel_macro(action_bind_sublabel_show_wimp, MENU_ENUM_SUBLABEL_SHOW_WIMP)
#endif
static int action_bind_sublabel_cheevos_entry(
file_list_t *list,
@ -1942,6 +1944,11 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_ONSCREEN_NOTIFICATIONS_SETTINGS:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_onscreen_notifications_settings_list);
break;
#ifdef HAVE_QT
case MENU_ENUM_LABEL_SHOW_WIMP:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_show_wimp);
break;
#endif
default:
case MSG_UNKNOWN:
return -1;

View File

@ -2359,6 +2359,9 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
return xmb->textures.list[XMB_TEXTURE_RECORD];
case MENU_ENUM_LABEL_ONSCREEN_DISPLAY_SETTINGS:
return xmb->textures.list[XMB_TEXTURE_OSD];
#ifdef HAVE_QT
case MENU_ENUM_LABEL_SHOW_WIMP:
#endif
case MENU_ENUM_LABEL_USER_INTERFACE_SETTINGS:
return xmb->textures.list[XMB_TEXTURE_UI];
case MENU_ENUM_LABEL_POWER_MANAGEMENT_SETTINGS:
@ -5263,6 +5266,13 @@ static int xmb_list_push(void *data, void *userdata,
entry.enum_idx = MENU_ENUM_LABEL_ADD_CONTENT_LIST;
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
#ifdef HAVE_QT
if (settings->bools.desktop_menu_enable)
{
entry.enum_idx = MENU_ENUM_LABEL_SHOW_WIMP;
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
}
#endif
#if defined(HAVE_NETWORKING)
{
settings_t *settings = config_get_ptr();
@ -5307,7 +5317,6 @@ static int xmb_list_push(void *data, void *userdata,
entry.enum_idx = MENU_ENUM_LABEL_HELP_LIST;
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
}
#if !defined(IOS)
if (settings->bools.menu_show_quit_retroarch)
{

View File

@ -4857,7 +4857,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
string_is_equal(core_path, path_get(RARCH_PATH_CORE)))
{
strlcpy(new_path_entry, core_path, sizeof(new_path_entry));
snprintf(new_entry, sizeof(new_entry), "%s (%s)",
snprintf(new_entry, sizeof(new_entry), "%s (%s)",
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DETECT_CORE_LIST_OK_CURRENT_CORE),
core_name);
new_lbl_entry[0] = '\0';
@ -5538,7 +5538,11 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_MENU_SHOW_HELP,
PARSE_ONLY_BOOL, false);
#ifdef HAVE_QT
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_SHOW_WIMP,
PARSE_ONLY_UINT, false);
#endif
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_MENU_SHOW_QUIT_RETROARCH,
PARSE_ONLY_BOOL, false);
@ -6291,11 +6295,11 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_SCREEN_RESOLUTION,
PARSE_ACTION, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_CRT_SWITCH_RESOLUTION,
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_CRT_SWITCH_RESOLUTION,
PARSE_ONLY_BOOL, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_CRT_SWITCH_RESOLUTION_SUPER,
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_CRT_SWITCH_RESOLUTION_SUPER,
PARSE_ONLY_UINT, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_PAL60_ENABLE,
@ -6908,7 +6912,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
{
settings_t *settings = config_get_ptr();
if (settings->bools.quick_menu_show_save_core_overrides
if (settings->bools.quick_menu_show_save_core_overrides
&& !settings->bools.kiosk_mode_enable)
{
menu_entries_append_enum(info->list,
@ -6919,7 +6923,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
count++;
}
if (settings->bools.quick_menu_show_save_content_dir_overrides
if (settings->bools.quick_menu_show_save_content_dir_overrides
&& !settings->bools.kiosk_mode_enable)
{
menu_entries_append_enum(info->list,
@ -6930,7 +6934,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
count++;
}
if (settings->bools.quick_menu_show_save_game_overrides
if (settings->bools.quick_menu_show_save_game_overrides
&& !settings->bools.kiosk_mode_enable)
{
menu_entries_append_enum(info->list,

View File

@ -2468,7 +2468,16 @@ static bool setting_append_list(
&subgroup_info,
parent_group);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_LAKKA_ADVANCED);
#ifdef HAVE_QT
CONFIG_ACTION(
list, list_info,
MENU_ENUM_LABEL_SHOW_WIMP,
MENU_ENUM_LABEL_VALUE_SHOW_WIMP,
&group_info,
&subgroup_info,
parent_group);
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_UI_COMPANION_TOGGLE);
#endif
#if !defined(IOS)
/* Apple rejects iOS apps that let you forcibly quit them. */
CONFIG_ACTION(
@ -3497,7 +3506,7 @@ static bool setting_append_list(
case SETTINGS_LIST_CHEAT_SEARCH:
if ( ! cheat_manager_state.cheats )
break ;
START_GROUP(list, list_info, &group_info, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_SETTINGS), parent_group);
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_SEARCH_SETTINGS);
@ -3764,9 +3773,9 @@ static bool setting_append_list(
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
CONFIG_BOOL(
CONFIG_BOOL(
list, list_info,
&settings->bools.crt_switch_resolution,
MENU_ENUM_LABEL_CRT_SWITCH_RESOLUTION,
@ -3780,18 +3789,18 @@ static bool setting_append_list(
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED
);
);
CONFIG_UINT(
list, list_info,
&settings->uints.crt_switch_resolution_super,
MENU_ENUM_LABEL_CRT_SWITCH_RESOLUTION_SUPER,
MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION_SUPER,
crt_switch_resolution_super,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
list, list_info,
&settings->uints.crt_switch_resolution_super,
MENU_ENUM_LABEL_CRT_SWITCH_RESOLUTION_SUPER,
MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION_SUPER,
crt_switch_resolution_super,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);

View File

@ -1496,6 +1496,9 @@ enum msg_hash_enums
MENU_LABEL(BUILDBOT_ASSETS_URL),
MENU_LABEL(CORE_SET_SUPPORTS_NO_CONTENT_ENABLE),
MENU_LABEL(CLOSE_CONTENT),
#ifdef HAVE_QT
MENU_LABEL(SHOW_WIMP),
#endif
MENU_LABEL(QUIT_RETROARCH),
MENU_LABEL(SHUTDOWN),
MENU_LABEL(REBOOT),

View File

@ -607,6 +607,11 @@ static void ui_companion_qt_toggle(void *data, bool force)
#endif
if (settings->bools.ui_companion_toggle || force)
{
if (settings->bools.video_fullscreen)
command_event(CMD_EVENT_FULLSCREEN_TOGGLE, NULL);
win_handle->qtWindow->activateWindow();
win_handle->qtWindow->raise();
video_driver_show_mouse();
win_handle->qtWindow->show();