mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 00:39:53 +00:00
Add 'Start Remote Gamepad' entry
This commit is contained in:
parent
7d26034ebe
commit
ccd5b2f73d
@ -2068,6 +2068,18 @@ static int action_ok_start_core(const char *path,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_ok_start_net_retropad_core(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
content_ctx_info_t content_info = {0};
|
||||
task_push_content_load_default(NULL, NULL,
|
||||
&content_info, CORE_TYPE_PLAIN,
|
||||
CONTENT_MODE_LOAD_NOTHING_WITH_NET_RETROPAD_CORE_FROM_MENU,
|
||||
NULL, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_ok_open_archive_detect_core(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
@ -2339,6 +2351,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
||||
case MENU_LABEL_START_CORE:
|
||||
BIND_ACTION_OK(cbs, action_ok_start_core);
|
||||
break;
|
||||
case MENU_LABEL_START_NET_RETROPAD:
|
||||
BIND_ACTION_OK(cbs, action_ok_start_net_retropad_core);
|
||||
break;
|
||||
case MENU_LABEL_OPEN_ARCHIVE_DETECT_CORE:
|
||||
BIND_ACTION_OK(cbs, action_ok_open_archive_detect_core);
|
||||
break;
|
||||
|
@ -1408,6 +1408,9 @@ static int mui_list_push(void *data, void *userdata,
|
||||
entry.info_label = menu_hash_to_str(MENU_LABEL_START_CORE);
|
||||
menu_displaylist_ctl(DISPLAYLIST_SETTING, &entry);
|
||||
|
||||
entry.info_label = menu_hash_to_str(MENU_LABEL_START_NET_RETROPAD);
|
||||
menu_displaylist_ctl(DISPLAYLIST_SETTING, &entry);
|
||||
|
||||
#ifndef HAVE_DYNAMIC
|
||||
if (frontend_driver_has_fork())
|
||||
#endif
|
||||
|
@ -3194,6 +3194,9 @@ static int xmb_list_push(void *data, void *userdata,
|
||||
entry.info_label = menu_hash_to_str(MENU_LABEL_START_CORE);
|
||||
menu_displaylist_ctl(DISPLAYLIST_SETTING, &entry);
|
||||
|
||||
entry.info_label = menu_hash_to_str(MENU_LABEL_START_NET_RETROPAD);
|
||||
menu_displaylist_ctl(DISPLAYLIST_SETTING, &entry);
|
||||
|
||||
#ifndef HAVE_DYNAMIC
|
||||
if (frontend_driver_has_fork())
|
||||
#endif
|
||||
|
@ -620,6 +620,8 @@ static const char *menu_hash_to_str_us_label(uint32_t hash)
|
||||
return "take_screenshot";
|
||||
case MENU_LABEL_CORE_UPDATER_LIST:
|
||||
return "core_updater_list";
|
||||
case MENU_LABEL_START_NET_RETROPAD:
|
||||
return "menu_start_net_retropad";
|
||||
case MENU_LABEL_THUMBNAILS_UPDATER_LIST:
|
||||
return "thumbnails_updater_list";
|
||||
case MENU_LABEL_CORE_UPDATER_BUILDBOT_URL:
|
||||
@ -754,6 +756,8 @@ const char *menu_hash_to_str_us(uint32_t hash)
|
||||
|
||||
switch (hash)
|
||||
{
|
||||
case MENU_LABEL_VALUE_START_NET_RETROPAD:
|
||||
return "Start Remote RetroPad";
|
||||
case MENU_LABEL_VALUE_THUMBNAILS_UPDATER_LIST:
|
||||
return "Thumbnails Updater";
|
||||
case MENU_LABEL_VALUE_MENU_LINEAR_FILTER:
|
||||
|
@ -3411,6 +3411,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
menu_displaylist_parse_settings(menu, info,
|
||||
menu_hash_to_str(MENU_LABEL_START_CORE), PARSE_ACTION, false);
|
||||
|
||||
menu_displaylist_parse_settings(menu, info,
|
||||
menu_hash_to_str(MENU_LABEL_START_NET_RETROPAD), PARSE_ACTION, false);
|
||||
|
||||
#ifndef HAVE_DYNAMIC
|
||||
if (frontend_driver_has_fork())
|
||||
#endif
|
||||
|
@ -20,6 +20,9 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MENU_LABEL_START_NET_RETROPAD 0xf2ae670dU
|
||||
#define MENU_LABEL_VALUE_START_NET_RETROPAD 0xad11a6a0U
|
||||
|
||||
#define CB_THUMBNAILS_UPDATER_DOWNLOAD 0xf4ee156bU
|
||||
|
||||
#define MENU_LABEL_THUMBNAILS_UPDATER_LIST 0xff70176bU
|
||||
|
@ -3563,6 +3563,16 @@ static bool setting_append_list(
|
||||
&subgroup_info,
|
||||
parent_group);
|
||||
|
||||
#if defined(HAVE_NETPLAY) && defined(HAVE_NETWORK_GAMEPAD)
|
||||
CONFIG_ACTION(
|
||||
list, list_info,
|
||||
menu_hash_to_str(MENU_LABEL_START_NET_RETROPAD),
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_START_NET_RETROPAD),
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group);
|
||||
#endif
|
||||
|
||||
CONFIG_ACTION(
|
||||
list, list_info,
|
||||
menu_hash_to_str(MENU_LABEL_CONTENT_SETTINGS),
|
||||
|
@ -1709,6 +1709,7 @@ bool task_push_content_load_default(
|
||||
switch (mode)
|
||||
{
|
||||
case CONTENT_MODE_LOAD_NOTHING_WITH_CURRENT_CORE_FROM_MENU:
|
||||
case CONTENT_MODE_LOAD_NOTHING_WITH_NET_RETROPAD_CORE_FROM_MENU:
|
||||
case CONTENT_MODE_LOAD_CONTENT_FROM_PLAYLIST_FROM_MENU:
|
||||
case CONTENT_MODE_LOAD_CONTENT_WITH_NEW_CORE_FROM_MENU:
|
||||
case CONTENT_MODE_LOAD_CONTENT_WITH_FFMPEG_CORE_FROM_MENU:
|
||||
@ -1746,6 +1747,20 @@ bool task_push_content_load_default(
|
||||
#ifdef HAVE_MENU
|
||||
if (!content_load_wrapper(content_info, true))
|
||||
goto error;
|
||||
#endif
|
||||
break;
|
||||
case CONTENT_MODE_LOAD_NOTHING_WITH_NET_RETROPAD_CORE_FROM_MENU:
|
||||
#if defined(HAVE_NETWORK) && defined(HAVE_NETWORK_GAMEPAD)
|
||||
core_path = settings->path.libretro; /* TODO/FIXME */
|
||||
runloop_ctl(RUNLOOP_CTL_CLEAR_CONTENT_PATH, NULL);
|
||||
runloop_ctl(RUNLOOP_CTL_SET_LIBRETRO_PATH, (void*)core_path);
|
||||
#ifdef HAVE_DYNAMIC
|
||||
command_event(CMD_EVENT_LOAD_CORE, NULL);
|
||||
#endif
|
||||
#ifdef HAVE_MENU
|
||||
if (!content_load_wrapper(content_info, true))
|
||||
goto error;
|
||||
#endif
|
||||
#endif
|
||||
break;
|
||||
case CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_MENU:
|
||||
|
@ -32,6 +32,7 @@ enum content_mode_load
|
||||
CONTENT_MODE_LOAD_NOTHING_WITH_DUMMY_CORE,
|
||||
CONTENT_MODE_LOAD_FROM_CLI,
|
||||
CONTENT_MODE_LOAD_NOTHING_WITH_CURRENT_CORE_FROM_MENU,
|
||||
CONTENT_MODE_LOAD_NOTHING_WITH_NET_RETROPAD_CORE_FROM_MENU,
|
||||
CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_MENU,
|
||||
CONTENT_MODE_LOAD_CONTENT_WITH_NEW_CORE_FROM_MENU,
|
||||
CONTENT_MODE_LOAD_CONTENT_WITH_FFMPEG_CORE_FROM_MENU,
|
||||
|
Loading…
x
Reference in New Issue
Block a user