Created
September 10, 2017 04:24
-
-
Save andres-asm/4ec3dd4d8ce7c8a8bb4c26b405eceb61 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git diff | |
diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h | |
index c26b80c88..13b5e8505 100644 | |
--- a/intl/msg_hash_us.h | |
+++ b/intl/msg_hash_us.h | |
@@ -1567,6 +1567,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_UPDATE_SLANG_SHADERS, | |
"Update Slang Shaders") | |
MSG_HASH(MENU_ENUM_LABEL_VALUE_USER, | |
"User") | |
+MSG_HASH(MENU_ENUM_LABEL_VALUE_KEYBOARD, | |
+ "Kbd") | |
MSG_HASH(MENU_ENUM_LABEL_VALUE_USER_INTERFACE_SETTINGS, | |
"User Interface") | |
MSG_HASH(MENU_ENUM_LABEL_VALUE_USER_LANGUAGE, | |
diff --git a/menu/cbs/menu_cbs_get_value.c b/menu/cbs/menu_cbs_get_value.c | |
index 5cbcba4db..cdfac0624 100644 | |
--- a/menu/cbs/menu_cbs_get_value.c | |
+++ b/menu/cbs/menu_cbs_get_value.c | |
@@ -39,6 +39,7 @@ | |
#include "../../performance_counters.h" | |
#include "../../paths.h" | |
#include "../../retroarch.h" | |
+#include "../../verbosity.h" | |
#include "../../wifi/wifi_driver.h" | |
#ifndef BIND_ACTION_GET_VALUE | |
@@ -485,6 +486,19 @@ static void menu_action_setting_disp_set_label_input_desc( | |
} | |
+static void menu_action_setting_disp_set_label_input_desc_kbd( | |
+ file_list_t* list, | |
+ unsigned *w, unsigned type, unsigned i, | |
+ const char *label, | |
+ char *s, size_t len, | |
+ const char *entry_label, | |
+ const char *path, | |
+ char *s2, size_t len2) | |
+{ | |
+ RARCH_LOG("Implementation goes here\n"); | |
+} | |
+ | |
+ | |
static void menu_action_setting_disp_set_label_cheat( | |
file_list_t* list, | |
unsigned *w, unsigned type, unsigned i, | |
@@ -1726,6 +1740,12 @@ static int menu_cbs_init_bind_get_string_representation_compare_type( | |
BIND_ACTION_GET_VALUE(cbs, | |
menu_action_setting_disp_set_label_libretro_perf_counters); | |
} | |
+ else if (type >= MENU_SETTINGS_INPUT_DESC_KBD_BEGIN | |
+ && type <= MENU_SETTINGS_INPUT_DESC_KBD_END) | |
+ { | |
+ BIND_ACTION_GET_VALUE(cbs, | |
+ menu_action_setting_disp_set_label_input_desc_kbd); | |
+ } | |
else | |
{ | |
switch (type) | |
diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c | |
index cc9eb50f0..60112474b 100644 | |
--- a/menu/menu_displaylist.c | |
+++ b/menu/menu_displaylist.c | |
@@ -62,6 +62,7 @@ | |
#include "../configuration.h" | |
#include "../file_path_special.h" | |
#include "../defaults.h" | |
+#include "../verbosity.h" | |
#include "../managers/cheat_manager.h" | |
#include "../managers/core_option_manager.h" | |
#include "../paths.h" | |
@@ -3488,6 +3489,26 @@ static int menu_displaylist_parse_options_remappings( | |
} | |
} | |
} | |
+ if (system) | |
+ { | |
+ settings_t *settings = config_get_ptr(); | |
+ for (retro_id = 0; retro_id < RARCH_FIRST_CUSTOM_BIND; retro_id++) | |
+ { | |
+ char desc_label[64]; | |
+ unsigned user = settings->uints.keyboard_mapper_port + 1; | |
+ unsigned desc_offset = retro_id; | |
+ const char *description = NULL; | |
+ | |
+ desc_label[0] = '\0'; | |
+ | |
+ snprintf(desc_label, sizeof(desc_label), | |
+ "%s: ", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_B + retro_id)); | |
+ menu_entries_append_enum(info->list, desc_label, "", | |
+ MSG_UNKNOWN, | |
+ MENU_SETTINGS_INPUT_DESC_KBD_BEGIN + | |
+ MENU_SETTINGS_INPUT_DESC_KBD_END + retro_id, 0, 0); | |
+ } | |
+ } | |
return 0; | |
} | |
diff --git a/menu/menu_driver.h b/menu/menu_driver.h | |
index e372230de..922f7f9b2 100644 | |
--- a/menu/menu_driver.h | |
+++ b/menu/menu_driver.h | |
@@ -206,6 +206,8 @@ enum menu_settings_type | |
MENU_SETTINGS_CHEAT_END = MENU_SETTINGS_CHEAT_BEGIN + (MAX_CHEAT_COUNTERS - 1), | |
MENU_SETTINGS_INPUT_DESC_BEGIN, | |
MENU_SETTINGS_INPUT_DESC_END = MENU_SETTINGS_INPUT_DESC_BEGIN + (MAX_USERS * (RARCH_FIRST_CUSTOM_BIND + 4)), | |
+ MENU_SETTINGS_INPUT_DESC_KBD_BEGIN, | |
+ MENU_SETTINGS_INPUT_DESC_KBD_END = MENU_SETTINGS_INPUT_DESC_KBD_BEGIN + 191, | |
MENU_SETTINGS_LAST | |
}; | |
diff --git a/msg_hash.h b/msg_hash.h | |
index 67107195c..a10d84057 100644 | |
--- a/msg_hash.h | |
+++ b/msg_hash.h | |
@@ -927,6 +927,7 @@ enum msg_hash_enums | |
MENU_ENUM_LABEL_VALUE_NEAREST, | |
MENU_ENUM_LABEL_VALUE_UNKNOWN, | |
MENU_ENUM_LABEL_VALUE_USER, | |
+ MENU_ENUM_LABEL_VALUE_KEYBOARD, | |
MENU_ENUM_LABEL_VALUE_CHEAT, | |
MENU_ENUM_LABEL_VALUE_SHADER, | |
MENU_ENUM_LABEL_VALUE_DIRECTORY_CONTENT, | |
(END) | |
#include "../managers/core_option_manager.h" | |
#include "../paths.h" | |
@@ -3488,6 +3489,26 @@ static int menu_displaylist_parse_options_remappings( | |
} | |
} | |
} | |
+ if (system) | |
+ { | |
+ settings_t *settings = config_get_ptr(); | |
+ for (retro_id = 0; retro_id < RARCH_FIRST_CUSTOM_BIND; retro_id++) | |
+ { | |
+ char desc_label[64]; | |
+ unsigned user = settings->uints.keyboard_mapper_port + 1; | |
+ unsigned desc_offset = retro_id; | |
+ const char *description = NULL; | |
+ | |
+ desc_label[0] = '\0'; | |
+ | |
+ snprintf(desc_label, sizeof(desc_label), | |
+ "%s: ", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_B + retro_id)); | |
+ menu_entries_append_enum(info->list, desc_label, "", | |
+ MSG_UNKNOWN, | |
+ MENU_SETTINGS_INPUT_DESC_KBD_BEGIN + | |
+ MENU_SETTINGS_INPUT_DESC_KBD_END + retro_id, 0, 0); | |
+ } | |
+ } | |
return 0; | |
} | |
diff --git a/menu/menu_driver.h b/menu/menu_driver.h | |
index e372230de..922f7f9b2 100644 | |
--- a/menu/menu_driver.h | |
+++ b/menu/menu_driver.h | |
@@ -206,6 +206,8 @@ enum menu_settings_type | |
MENU_SETTINGS_CHEAT_END = MENU_SETTINGS_CHEAT_BEGIN + (MAX_CHEAT_COUNTERS - 1), | |
MENU_SETTINGS_INPUT_DESC_BEGIN, | |
MENU_SETTINGS_INPUT_DESC_END = MENU_SETTINGS_INPUT_DESC_BEGIN + (MAX_USERS * (RARCH_FIRST_CUSTOM_BIND + 4)), | |
+ MENU_SETTINGS_INPUT_DESC_KBD_BEGIN, | |
+ MENU_SETTINGS_INPUT_DESC_KBD_END = MENU_SETTINGS_INPUT_DESC_KBD_BEGIN + 191, | |
MENU_SETTINGS_LAST | |
}; | |
diff --git a/msg_hash.h b/msg_hash.h | |
index 67107195c..a10d84057 100644 | |
--- a/msg_hash.h | |
+++ b/msg_hash.h | |
@@ -927,6 +927,7 @@ enum msg_hash_enums | |
MENU_ENUM_LABEL_VALUE_NEAREST, | |
MENU_ENUM_LABEL_VALUE_UNKNOWN, | |
MENU_ENUM_LABEL_VALUE_USER, | |
+ MENU_ENUM_LABEL_VALUE_KEYBOARD, | |
MENU_ENUM_LABEL_VALUE_CHEAT, | |
MENU_ENUM_LABEL_VALUE_SHADER, | |
MENU_ENUM_LABEL_VALUE_DIRECTORY_CONTENT, | |
~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment