From 358d7cc6426875b069ef0aae418c12c44d59e92c Mon Sep 17 00:00:00 2001 From: zoltanvb <101990835+zoltanvb@users.noreply.github.com> Date: Mon, 4 Dec 2023 22:42:34 +0100 Subject: [PATCH] Add help text for controller drivers (#15977) Added labels and help text for controller drivers. Help was skipped for those drivers which likely have no alternative on the given platform. --- intl/msg_hash_lbl.h | 103 ++++++++++++++++++++++++++++++++++++++++++++ intl/msg_hash_us.c | 20 +++++++++ intl/msg_hash_us.h | 31 ++++++++++++- msg_hash.h | 45 +++++++++++++++++++ 4 files changed, 198 insertions(+), 1 deletion(-) diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index d1e0454778..7c8418600b 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -5341,6 +5341,109 @@ MSG_HASH( MENU_ENUM_LABEL_INPUT_DRIVER_NULL, "null" ) +MSG_HASH( + MENU_ENUM_LABEL_JOYPAD_DRIVER_ANDROID, + "android" +) +MSG_HASH( + MENU_ENUM_LABEL_JOYPAD_DRIVER_CTR, + "ctr" +) +MSG_HASH( + MENU_ENUM_LABEL_JOYPAD_DRIVER_DINPUT, + "dinput" +) +MSG_HASH( + MENU_ENUM_LABEL_JOYPAD_DRIVER_DOS, + "dos" +) +MSG_HASH( + MENU_ENUM_LABEL_JOYPAD_DRIVER_GX, + "gx" +) +MSG_HASH( + MENU_ENUM_LABEL_JOYPAD_DRIVER_HID, + "hid" +) +MSG_HASH( + MENU_ENUM_LABEL_JOYPAD_DRIVER_LINUXRAW, + "linuxraw" +) +MSG_HASH( + MENU_ENUM_LABEL_JOYPAD_DRIVER_PARPORT, + "parport" +) +MSG_HASH( + MENU_ENUM_LABEL_JOYPAD_DRIVER_PS2, + "ps2" +) +MSG_HASH( + MENU_ENUM_LABEL_JOYPAD_DRIVER_PS3, + "ps3" +) +MSG_HASH( + MENU_ENUM_LABEL_JOYPAD_DRIVER_PS4, + "ps4" +) +#ifdef VITA +MSG_HASH( + MENU_ENUM_LABEL_JOYPAD_DRIVER_PSP, + "vita" +) +#else +MSG_HASH( + MENU_ENUM_LABEL_JOYPAD_DRIVER_PSP, + "psp" +) +#endif +MSG_HASH( + MENU_ENUM_LABEL_JOYPAD_DRIVER_QNX, + "qnx" +) +MSG_HASH( + MENU_ENUM_LABEL_JOYPAD_DRIVER_RWEBPAD, + "rwebpad" +) +MSG_HASH( + MENU_ENUM_LABEL_JOYPAD_DRIVER_SDL_DINGUX, + "sdl_dingux" +) +#ifdef HAVE_SDL2 +MSG_HASH( + MENU_ENUM_LABEL_JOYPAD_DRIVER_SDL, + "sdl2" +) +#else +MSG_HASH( + MENU_ENUM_LABEL_JOYPAD_DRIVER_SDL, + "sdl" +) +#endif +MSG_HASH( + MENU_ENUM_LABEL_JOYPAD_DRIVER_SWITCH, + "switch" +) +MSG_HASH( + MENU_ENUM_LABEL_JOYPAD_DRIVER_UDEV, + "udev" +) +MSG_HASH( + MENU_ENUM_LABEL_JOYPAD_DRIVER_WIIU, + "wiiu" +) +MSG_HASH( + MENU_ENUM_LABEL_JOYPAD_DRIVER_XDK, + "xdk" +) +MSG_HASH( + MENU_ENUM_LABEL_JOYPAD_DRIVER_XINPUT, + "xinput" +) +MSG_HASH( + MENU_ENUM_LABEL_JOYPAD_DRIVER_NULL, + "null" +) + MSG_HASH( MENU_ENUM_LABEL_VIDEO_WINDOW_SHOW_DECORATIONS, "video_window_show_decorations" diff --git a/intl/msg_hash_us.c b/intl/msg_hash_us.c index abd1350f8c..9b311726e0 100644 --- a/intl/msg_hash_us.c +++ b/intl/msg_hash_us.c @@ -160,6 +160,26 @@ int msg_hash_get_help_us_enum(enum msg_hash_enums msg, char *s, size_t len) strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_HELP_INPUT_DRIVER_NO_DETAILS), len); } break; + case MENU_ENUM_LABEL_JOYPAD_DRIVER: + { + const char *lbl = settings ? settings->arrays.input_joypad_driver : NULL; + + if (string_is_equal(lbl, msg_hash_to_str(MENU_ENUM_LABEL_JOYPAD_DRIVER_UDEV))) + strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_UDEV), len); + else if (string_is_equal(lbl, msg_hash_to_str(MENU_ENUM_LABEL_JOYPAD_DRIVER_LINUXRAW))) + strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_LINUXRAW), len); + else if (string_is_equal(lbl, msg_hash_to_str(MENU_ENUM_LABEL_JOYPAD_DRIVER_DINPUT))) + strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_DINPUT), len); + else if (string_is_equal(lbl, msg_hash_to_str(MENU_ENUM_LABEL_JOYPAD_DRIVER_XINPUT))) + strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_XINPUT), len); + else if (string_is_equal(lbl, msg_hash_to_str(MENU_ENUM_LABEL_JOYPAD_DRIVER_SDL))) + strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_SDL), len); + else if (string_is_equal(lbl, msg_hash_to_str(MENU_ENUM_LABEL_JOYPAD_DRIVER_PARPORT))) + strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_PARPORT), len); + else if (string_is_equal(lbl, msg_hash_to_str(MENU_ENUM_LABEL_JOYPAD_DRIVER_HID))) + strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_HID), len); + } + break; case MENU_ENUM_LABEL_MENU_DRIVER: { const char *lbl = settings ? settings->arrays.menu_driver : NULL; diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index 7bd398d13d..80ac699b02 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -1514,7 +1514,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_HELP_INPUT_DRIVER_UDEV, - "The udev input driver uses the recent evdev joypad API for joystick support. It supports hotplugging and force feedback.\nThe driver reads evdev events for keyboard support. It also supports keyboard callback, mice and touchpads.\nBy default in most distros, /dev/input nodes are root-only (mode 600). You can set up a udev rule which makes these accessible to non-root." + "The udev driver reads evdev events for keyboard support. It also supports keyboard callback, mice and touchpads.\nBy default in most distros, /dev/input nodes are root-only (mode 600). You can set up a udev rule which makes these accessible to non-root." ) MSG_HASH( MENU_ENUM_LABEL_HELP_INPUT_DRIVER_LINUXRAW, @@ -1532,6 +1532,35 @@ MSG_HASH( MENU_ENUM_SUBLABEL_JOYPAD_DRIVER, "Controller driver to use." ) +MSG_HASH( + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_DINPUT, + "DirectInput controller driver." + ) +MSG_HASH( + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_HID, + "Low-level Human Interface Device driver." + ) +MSG_HASH( + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_LINUXRAW, + "Raw Linux driver, uses legacy joystick API. Use udev instead if possible." + ) +MSG_HASH( + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_PARPORT, + "Linux driver for controllers connected parallel port via special adapters." + ) +MSG_HASH( + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_SDL, + "Controller driver based on SDL libraries." + ) +MSG_HASH( + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_UDEV, + "Controller driver with udev interface, generally recommended. Uses the recent evdev joypad API for joystick support. It supports hotplugging and force feedback.\nBy default in most distros, /dev/input nodes are root-only (mode 600). You can set up a udev rule which makes these accessible to non-root." + ) +MSG_HASH( + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_XINPUT, + "XInput controller driver. Mostly for XBox controllers." + ) + MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER, "Video" diff --git a/msg_hash.h b/msg_hash.h index 9b7270a8fd..ff20ed6534 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -950,6 +950,51 @@ enum msg_hash_enums MENU_ENUM_LABEL_HELP_INPUT_DRIVER_NULL, MENU_ENUM_LABEL_HELP_INPUT_DRIVER_NO_DETAILS, + MENU_ENUM_LABEL_JOYPAD_DRIVER_ANDROID, + MENU_ENUM_LABEL_JOYPAD_DRIVER_CTR, + MENU_ENUM_LABEL_JOYPAD_DRIVER_DINPUT, + MENU_ENUM_LABEL_JOYPAD_DRIVER_DOS, + MENU_ENUM_LABEL_JOYPAD_DRIVER_GX, + MENU_ENUM_LABEL_JOYPAD_DRIVER_HID, + MENU_ENUM_LABEL_JOYPAD_DRIVER_LINUXRAW, + MENU_ENUM_LABEL_JOYPAD_DRIVER_PARPORT, + MENU_ENUM_LABEL_JOYPAD_DRIVER_PS2, + MENU_ENUM_LABEL_JOYPAD_DRIVER_PS3, + MENU_ENUM_LABEL_JOYPAD_DRIVER_PS4, + MENU_ENUM_LABEL_JOYPAD_DRIVER_PSP, + MENU_ENUM_LABEL_JOYPAD_DRIVER_QNX, + MENU_ENUM_LABEL_JOYPAD_DRIVER_RWEBPAD, + MENU_ENUM_LABEL_JOYPAD_DRIVER_SDL_DINGUX, + MENU_ENUM_LABEL_JOYPAD_DRIVER_SDL, + MENU_ENUM_LABEL_JOYPAD_DRIVER_SWITCH, + MENU_ENUM_LABEL_JOYPAD_DRIVER_UDEV, + MENU_ENUM_LABEL_JOYPAD_DRIVER_WIIU, + MENU_ENUM_LABEL_JOYPAD_DRIVER_XDK, + MENU_ENUM_LABEL_JOYPAD_DRIVER_XINPUT, + MENU_ENUM_LABEL_JOYPAD_DRIVER_NULL, + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_ANDROID, + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_CTR, + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_DINPUT, + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_DOS, + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_GX, + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_HID, + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_LINUXRAW, + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_PARPORT, + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_PS2, + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_PS3, + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_PS4, + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_PSP, + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_QNX, + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_RWEBPAD, + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_SDL_DINGUX, + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_SDL, + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_SWITCH, + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_UDEV, + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_WIIU, + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_XDK, + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_XINPUT, + MENU_ENUM_LABEL_HELP_JOYPAD_DRIVER_NULL, + MENU_ENUM_LABEL_INPUT_USER_1_BINDS, MENU_ENUM_LABEL_INPUT_USER_2_BINDS, MENU_ENUM_LABEL_INPUT_USER_3_BINDS,