mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-03 07:22:15 +00:00
[Switch] Really fix splitting/joining JoyCons via single option
This commit is contained in:
parent
4a65436df1
commit
8c0c0e3eae
@ -1775,14 +1775,7 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
|||||||
SETTING_UINT("rgui_particle_effect", &settings->uints.menu_rgui_particle_effect, true, rgui_particle_effect, false);
|
SETTING_UINT("rgui_particle_effect", &settings->uints.menu_rgui_particle_effect, true, rgui_particle_effect, false);
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_LIBNX
|
#ifdef HAVE_LIBNX
|
||||||
SETTING_UINT("split_joycon_p1", &settings->uints.input_split_joycon[0], true, 0, false);
|
SETTING_UINT("split_joycon", &settings->uints.input_split_joycon, true, 0, false);
|
||||||
SETTING_UINT("split_joycon_p2", &settings->uints.input_split_joycon[1], true, 0, false);
|
|
||||||
SETTING_UINT("split_joycon_p3", &settings->uints.input_split_joycon[2], true, 0, false);
|
|
||||||
SETTING_UINT("split_joycon_p4", &settings->uints.input_split_joycon[3], true, 0, false);
|
|
||||||
SETTING_UINT("split_joycon_p5", &settings->uints.input_split_joycon[4], true, 0, false);
|
|
||||||
SETTING_UINT("split_joycon_p6", &settings->uints.input_split_joycon[5], true, 0, false);
|
|
||||||
SETTING_UINT("split_joycon_p7", &settings->uints.input_split_joycon[6], true, 0, false);
|
|
||||||
SETTING_UINT("split_joycon_p8", &settings->uints.input_split_joycon[7], true, 0, false);
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_XMB
|
#ifdef HAVE_XMB
|
||||||
SETTING_UINT("menu_xmb_animation_opening_main_menu", &settings->uints.menu_xmb_animation_opening_main_menu, true, 0 /* TODO/FIXME - implement */, false);
|
SETTING_UINT("menu_xmb_animation_opening_main_menu", &settings->uints.menu_xmb_animation_opening_main_menu, true, 0 /* TODO/FIXME - implement */, false);
|
||||||
|
@ -543,7 +543,7 @@ typedef struct settings
|
|||||||
|
|
||||||
unsigned input_overlay_show_physical_inputs_port;
|
unsigned input_overlay_show_physical_inputs_port;
|
||||||
|
|
||||||
unsigned input_split_joycon[MAX_USERS];
|
unsigned input_split_joycon;
|
||||||
unsigned input_joypad_map[MAX_USERS];
|
unsigned input_joypad_map[MAX_USERS];
|
||||||
unsigned input_device[MAX_USERS];
|
unsigned input_device[MAX_USERS];
|
||||||
unsigned input_mouse_index[MAX_USERS];
|
unsigned input_mouse_index[MAX_USERS];
|
||||||
|
@ -29,7 +29,7 @@ static HidVibrationValue vibration_values[DEFAULT_MAX_PADS][2];
|
|||||||
static HidVibrationValue vibration_stop;
|
static HidVibrationValue vibration_stop;
|
||||||
static int previous_handheld = -1;
|
static int previous_handheld = -1;
|
||||||
/* 1 = handheld, 0 = docked, -1 = first use */
|
/* 1 = handheld, 0 = docked, -1 = first use */
|
||||||
static uint previous_split_joycon_setting[MAX_USERS] = { 0 };
|
static uint previous_split_joycon_setting = { -1 };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char *switch_joypad_name(unsigned pad)
|
static const char *switch_joypad_name(unsigned pad)
|
||||||
@ -166,8 +166,7 @@ static void switch_joypad_destroy(void)
|
|||||||
|
|
||||||
previous_handheld = -1;
|
previous_handheld = -1;
|
||||||
|
|
||||||
for (i = 0; i < MAX_USERS; i++)
|
previous_split_joycon_setting = 0;
|
||||||
previous_split_joycon_setting[i] = 0;
|
|
||||||
|
|
||||||
for (i = 0; i < DEFAULT_MAX_PADS; i++)
|
for (i = 0; i < DEFAULT_MAX_PADS; i++)
|
||||||
{
|
{
|
||||||
@ -185,6 +184,46 @@ static void switch_joypad_destroy(void)
|
|||||||
|
|
||||||
#ifdef HAVE_LIBNX
|
#ifdef HAVE_LIBNX
|
||||||
|
|
||||||
|
static void switch_split_joycons(void)
|
||||||
|
{
|
||||||
|
unsigned i;
|
||||||
|
for (i = 0; i < MAX_USERS; i += 2)
|
||||||
|
{
|
||||||
|
hidSetNpadJoyAssignmentModeSingleByDefault(i);
|
||||||
|
hidSetNpadJoyAssignmentModeSingleByDefault(i + 1);
|
||||||
|
hidSetNpadJoyHoldType(HidJoyHoldType_Horizontal);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void switch_join_joycons(void)
|
||||||
|
{
|
||||||
|
/* find all left/right single JoyCon pairs and join them together */
|
||||||
|
int id, id_0, id_1;
|
||||||
|
int last_right_id = MAX_USERS;
|
||||||
|
for (id = 0; id < MAX_USERS; id++)
|
||||||
|
hidSetNpadJoyAssignmentModeDual(id);
|
||||||
|
|
||||||
|
for (id_0 = 0; id_0 < MAX_USERS; id_0++)
|
||||||
|
{
|
||||||
|
if (hidGetControllerType(id_0) & TYPE_JOYCON_LEFT)
|
||||||
|
{
|
||||||
|
for (id_1 = last_right_id - 1; id_1 >= 0; id_1--)
|
||||||
|
{
|
||||||
|
if (hidGetControllerType(id_1) & TYPE_JOYCON_RIGHT)
|
||||||
|
{
|
||||||
|
/* prevent missing player numbers */
|
||||||
|
last_right_id = id_1;
|
||||||
|
if (id_0 < id_1)
|
||||||
|
hidMergeSingleJoyAsDualJoy(id_0, id_1);
|
||||||
|
else if (id_0 > id_1)
|
||||||
|
hidMergeSingleJoyAsDualJoy(id_1, id_0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void switch_joypad_poll(void)
|
static void switch_joypad_poll(void)
|
||||||
{
|
{
|
||||||
int i, handheld;
|
int i, handheld;
|
||||||
@ -192,106 +231,49 @@ static void switch_joypad_poll(void)
|
|||||||
|
|
||||||
hidScanInput();
|
hidScanInput();
|
||||||
|
|
||||||
|
/* handheld means the Switch is neither docked nor in tabletop mode */
|
||||||
|
/* e.g. it is used held in hands with both joycons attached */
|
||||||
handheld = hidGetHandheldMode();
|
handheld = hidGetHandheldMode();
|
||||||
|
|
||||||
if (previous_handheld == -1)
|
if (previous_handheld == -1)
|
||||||
{
|
{
|
||||||
/* First call of this function, apply joycon settings
|
/* first call of this function, apply joycon settings
|
||||||
* according to preferences, init variables */
|
* according to preferences */
|
||||||
if (!handheld)
|
if (!handheld && settings->uints.input_split_joycon)
|
||||||
{
|
switch_split_joycons();
|
||||||
for (i = 0; i < MAX_USERS; i += 2)
|
else
|
||||||
{
|
switch_join_joycons();
|
||||||
if (settings->uints.input_split_joycon[i])
|
|
||||||
{
|
|
||||||
hidSetNpadJoyAssignmentModeSingleByDefault(i);
|
|
||||||
hidSetNpadJoyAssignmentModeSingleByDefault(i + 1);
|
|
||||||
hidSetNpadJoyHoldType(HidJoyHoldType_Horizontal);
|
|
||||||
}
|
|
||||||
else if (!settings->uints.input_split_joycon[i])
|
|
||||||
{
|
|
||||||
hidSetNpadJoyAssignmentModeDual(i);
|
|
||||||
hidSetNpadJoyAssignmentModeDual(i + 1);
|
|
||||||
hidMergeSingleJoyAsDualJoy(i, i + 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
previous_handheld = handheld;
|
|
||||||
for (i = 0; i < MAX_USERS; i += 2)
|
|
||||||
previous_split_joycon_setting[i] = settings->uints.input_split_joycon[i];
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if (!handheld && previous_handheld)
|
|
||||||
{
|
{
|
||||||
/* switching out of handheld, so make sure
|
if (!handheld && previous_handheld)
|
||||||
* joycons are correctly split. */
|
|
||||||
for (i = 0; i < MAX_USERS; i += 2)
|
|
||||||
{
|
{
|
||||||
/* CONTROLLER_PLAYER_X, X == i++ */
|
/* switching out of handheld, so make sure
|
||||||
if (settings->uints.input_split_joycon[i])
|
* joycons are correctly split. */
|
||||||
|
if (settings->uints.input_split_joycon)
|
||||||
|
switch_split_joycons();
|
||||||
|
}
|
||||||
|
else if (handheld && !previous_handheld)
|
||||||
|
{
|
||||||
|
/* switching into handheld, so make sure all split joycons are joined */
|
||||||
|
switch_join_joycons();
|
||||||
|
}
|
||||||
|
else if (!handheld)
|
||||||
|
{
|
||||||
|
/* the user might have changed the split joycon setting, so respond */
|
||||||
|
if (settings->uints.input_split_joycon && !previous_split_joycon_setting)
|
||||||
{
|
{
|
||||||
hidSetNpadJoyAssignmentModeSingleByDefault(i);
|
/* setting changed from unsplit to split, so split them all */
|
||||||
hidSetNpadJoyAssignmentModeSingleByDefault(i + 1);
|
switch_split_joycons();
|
||||||
hidSetNpadJoyHoldType(HidJoyHoldType_Horizontal);
|
}
|
||||||
|
else if (!settings->uints.input_split_joycon && previous_split_joycon_setting)
|
||||||
|
{
|
||||||
|
/* setting changed from split to unsplit, so join them all */
|
||||||
|
switch_join_joycons();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (handheld && !previous_handheld)
|
previous_split_joycon_setting = settings->uints.input_split_joycon;
|
||||||
{
|
|
||||||
/* switching into handheld, so make sure all split joycons are joined */
|
|
||||||
for (i = 0; i < MAX_USERS; i += 2)
|
|
||||||
{
|
|
||||||
/* find all left/right single JoyCon pairs and join them together */
|
|
||||||
int id, id_0, id_1;
|
|
||||||
int last_right_id = MAX_USERS;
|
|
||||||
for (id = 0; id < MAX_USERS; id++)
|
|
||||||
hidSetNpadJoyAssignmentModeDual(id);
|
|
||||||
|
|
||||||
for (id_0 = 0; id_0 < MAX_USERS; id_0++)
|
|
||||||
{
|
|
||||||
if (hidGetControllerType(id_0) & TYPE_JOYCON_LEFT)
|
|
||||||
{
|
|
||||||
for (id_1 = last_right_id - 1; id_1 >= 0; id_1--)
|
|
||||||
{
|
|
||||||
if (hidGetControllerType(id_1) & TYPE_JOYCON_RIGHT)
|
|
||||||
{
|
|
||||||
/* prevent missing player numbers */
|
|
||||||
last_right_id = id_1;
|
|
||||||
if (id_0 < id_1)
|
|
||||||
hidMergeSingleJoyAsDualJoy(id_0, id_1);
|
|
||||||
else if (id_0 > id_1)
|
|
||||||
hidMergeSingleJoyAsDualJoy(id_1, id_0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (!handheld)
|
|
||||||
{
|
|
||||||
/* split or join joycons every time the user changes a setting */
|
|
||||||
for (i = 0; i < MAX_USERS; i += 2)
|
|
||||||
{
|
|
||||||
if ( settings->uints.input_split_joycon[i]
|
|
||||||
&& !previous_split_joycon_setting[i])
|
|
||||||
{
|
|
||||||
hidSetNpadJoyAssignmentModeSingleByDefault(i);
|
|
||||||
hidSetNpadJoyAssignmentModeSingleByDefault(i + 1);
|
|
||||||
hidSetNpadJoyHoldType(HidJoyHoldType_Horizontal);
|
|
||||||
}
|
|
||||||
else if (!settings->uints.input_split_joycon[i]
|
|
||||||
&& previous_split_joycon_setting[i])
|
|
||||||
{
|
|
||||||
hidSetNpadJoyAssignmentModeDual(i);
|
|
||||||
hidSetNpadJoyAssignmentModeDual(i + 1);
|
|
||||||
hidMergeSingleJoyAsDualJoy(i, i + 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < MAX_USERS; i += 2)
|
|
||||||
previous_split_joycon_setting[i] = settings->uints.input_split_joycon[i];
|
|
||||||
previous_handheld = handheld;
|
previous_handheld = handheld;
|
||||||
|
|
||||||
for (i = 0; i < DEFAULT_MAX_PADS; i++)
|
for (i = 0; i < DEFAULT_MAX_PADS; i++)
|
||||||
|
@ -3728,7 +3728,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_TITLE,
|
|||||||
"Title of Stream")
|
"Title of Stream")
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON,
|
MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON,
|
||||||
"Split Joy-Con"
|
"Split Joy-Cons"
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG,
|
MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG,
|
||||||
|
@ -3504,7 +3504,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_TITLE,
|
|||||||
"串流名稱")
|
"串流名稱")
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON,
|
MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON,
|
||||||
"Split Joy-Con"
|
"Split Joy-Cons"
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG,
|
MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG,
|
||||||
|
@ -3633,7 +3633,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_TITLE,
|
|||||||
"Streamtitel")
|
"Streamtitel")
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON,
|
MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON,
|
||||||
"Split Joy-Con"
|
"Split Joy-Cons"
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG,
|
MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG,
|
||||||
|
@ -3392,7 +3392,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_TITLE,
|
|||||||
"Title of Stream")
|
"Title of Stream")
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON,
|
MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON,
|
||||||
"Split Joy-Con"
|
"Split Joy-Cons"
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG,
|
MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG,
|
||||||
|
@ -8863,7 +8863,7 @@ MSG_HASH(
|
|||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON,
|
MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON,
|
||||||
"Split Joy-Con"
|
"Split Joy-Cons"
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG,
|
MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG,
|
||||||
|
@ -3382,7 +3382,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_TITLE,
|
|||||||
"Titel van Stream")
|
"Titel van Stream")
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON,
|
MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON,
|
||||||
"Split Joy-Con"
|
"Split Joy-Cons"
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG,
|
MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG,
|
||||||
|
@ -8697,7 +8697,7 @@ MSG_HASH(
|
|||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON,
|
MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON,
|
||||||
"Split Joy-Con"
|
"Split Joy-Cons"
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG,
|
MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG,
|
||||||
|
@ -3458,7 +3458,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_TITLE,
|
|||||||
"Title of Stream")
|
"Title of Stream")
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON,
|
MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON,
|
||||||
"Split Joy-Con"
|
"Split Joy-Cons"
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG,
|
MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG,
|
||||||
|
@ -3656,7 +3656,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_TITLE,
|
|||||||
"Title of Stream")
|
"Title of Stream")
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON,
|
MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON,
|
||||||
"Split Joy-Con"
|
"Split Joy-Cons"
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG,
|
MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG,
|
||||||
|
@ -8761,7 +8761,7 @@ MSG_HASH(
|
|||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON,
|
MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON,
|
||||||
"Split Joy-Con"
|
"Split Joy-Cons"
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG,
|
MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG,
|
||||||
|
@ -3546,7 +3546,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_TITLE,
|
|||||||
"Title of Stream")
|
"Title of Stream")
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON,
|
MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON,
|
||||||
"Split Joy-Con"
|
"Split Joy-Cons"
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG,
|
MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG,
|
||||||
|
@ -3835,23 +3835,17 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
|
|||||||
|
|
||||||
#ifdef HAVE_LIBNX
|
#ifdef HAVE_LIBNX
|
||||||
{
|
{
|
||||||
unsigned user;
|
char key_split_joycon[PATH_MAX_LENGTH];
|
||||||
|
|
||||||
for (user = 0; user < 8; user++)
|
key_split_joycon[0] = '\0';
|
||||||
{
|
|
||||||
char key_split_joycon[PATH_MAX_LENGTH];
|
|
||||||
unsigned val = user + 1;
|
|
||||||
|
|
||||||
key_split_joycon[0] = '\0';
|
snprintf(key_split_joycon, sizeof(key_split_joycon),
|
||||||
|
"%s",
|
||||||
|
msg_hash_to_str(MENU_ENUM_LABEL_INPUT_SPLIT_JOYCON));
|
||||||
|
|
||||||
snprintf(key_split_joycon, sizeof(key_split_joycon),
|
if (menu_displaylist_parse_settings(list,
|
||||||
"%s_%u",
|
key_split_joycon, PARSE_ONLY_UINT, true, 0) != -1)
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_INPUT_SPLIT_JOYCON), val);
|
count++;
|
||||||
|
|
||||||
if (menu_displaylist_parse_settings(list,
|
|
||||||
key_split_joycon, PARSE_ONLY_UINT, true, 0) != -1)
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -5763,8 +5763,7 @@ static void get_string_representation_split_joycon(rarch_setting_t *setting, cha
|
|||||||
size_t len)
|
size_t len)
|
||||||
{
|
{
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
unsigned index_offset = setting->index_offset;
|
unsigned map = settings->uints.input_split_joycon;
|
||||||
unsigned map = settings->uints.input_split_joycon[index_offset];
|
|
||||||
|
|
||||||
if (map == 0)
|
if (map == 0)
|
||||||
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF), len);
|
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF), len);
|
||||||
@ -6490,8 +6489,8 @@ static bool setting_append_list_input_player_options(
|
|||||||
static char key_analog[MAX_USERS][64];
|
static char key_analog[MAX_USERS][64];
|
||||||
static char key_bind_all[MAX_USERS][64];
|
static char key_bind_all[MAX_USERS][64];
|
||||||
static char key_bind_all_save_autoconfig[MAX_USERS][64];
|
static char key_bind_all_save_autoconfig[MAX_USERS][64];
|
||||||
static char split_joycon[MAX_USERS][64];
|
static char split_joycon[64];
|
||||||
static char split_joycon_lbl[MAX_USERS][64];
|
static char split_joycon_lbl[64];
|
||||||
static char key_bind_defaults[MAX_USERS][64];
|
static char key_bind_defaults[MAX_USERS][64];
|
||||||
static char mouse_index[MAX_USERS][64];
|
static char mouse_index[MAX_USERS][64];
|
||||||
|
|
||||||
@ -6515,10 +6514,9 @@ static bool setting_append_list_input_player_options(
|
|||||||
snprintf(key_analog[user], sizeof(key_analog[user]),
|
snprintf(key_analog[user], sizeof(key_analog[user]),
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_INPUT_PLAYER_ANALOG_DPAD_MODE),
|
msg_hash_to_str(MENU_ENUM_LABEL_INPUT_PLAYER_ANALOG_DPAD_MODE),
|
||||||
user + 1);
|
user + 1);
|
||||||
snprintf(split_joycon[user], sizeof(split_joycon[user]),
|
snprintf(split_joycon, sizeof(split_joycon),
|
||||||
"%s_%u",
|
"%s",
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_INPUT_SPLIT_JOYCON),
|
msg_hash_to_str(MENU_ENUM_LABEL_INPUT_SPLIT_JOYCON));
|
||||||
user + 1);
|
|
||||||
fill_pathname_join_delim(key_bind_all[user], tmp_string, "bind_all", '_',
|
fill_pathname_join_delim(key_bind_all[user], tmp_string, "bind_all", '_',
|
||||||
sizeof(key_bind_all[user]));
|
sizeof(key_bind_all[user]));
|
||||||
fill_pathname_join_delim(key_bind_all_save_autoconfig[user],
|
fill_pathname_join_delim(key_bind_all_save_autoconfig[user],
|
||||||
@ -6530,8 +6528,8 @@ static bool setting_append_list_input_player_options(
|
|||||||
fill_pathname_join_delim(mouse_index[user], tmp_string, "mouse_index", '_',
|
fill_pathname_join_delim(mouse_index[user], tmp_string, "mouse_index", '_',
|
||||||
sizeof(mouse_index[user]));
|
sizeof(mouse_index[user]));
|
||||||
|
|
||||||
snprintf(split_joycon_lbl[user], sizeof(label[user]),
|
snprintf(split_joycon_lbl, sizeof(label),
|
||||||
"%s %u", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON), user + 1);
|
"%s", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON));
|
||||||
|
|
||||||
snprintf(label[user], sizeof(label[user]),
|
snprintf(label[user], sizeof(label[user]),
|
||||||
"%s %u %s", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_USER), user + 1,
|
"%s %u %s", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_USER), user + 1,
|
||||||
@ -6604,9 +6602,9 @@ static bool setting_append_list_input_player_options(
|
|||||||
#ifdef HAVE_LIBNX
|
#ifdef HAVE_LIBNX
|
||||||
CONFIG_UINT_ALT(
|
CONFIG_UINT_ALT(
|
||||||
list, list_info,
|
list, list_info,
|
||||||
&settings->uints.input_split_joycon[user],
|
&settings->uints.input_split_joycon,
|
||||||
split_joycon[user],
|
split_joycon,
|
||||||
split_joycon_lbl[user],
|
split_joycon_lbl,
|
||||||
user,
|
user,
|
||||||
&group_info,
|
&group_info,
|
||||||
&subgroup_info,
|
&subgroup_info,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user