Skip to content

Instantly share code, notes, and snippets.

@andres-asm
Created September 10, 2017 03:34
Show Gist options
  • Save andres-asm/416ec6322b1bc3ba7a93eb0e89408929 to your computer and use it in GitHub Desktop.
Save andres-asm/416ec6322b1bc3ba7a93eb0e89408929 to your computer and use it in GitHub Desktop.
snprintf(desc_label, sizeof(desc_label),
"%s %u %s : ", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_USER),
user, description);
menu_entries_append_enum(info->list, desc_label, "",
MSG_UNKNOWN,
MENU_SETTINGS_INPUT_DESC_BEGIN +
(p * (RARCH_FIRST_CUSTOM_BIND + 4)) + retro_id, 0, 0);
@andres-asm
Copy link
Author

static int action_left_input_desc(unsigned type, const char *label,
bool wraparound)
{
unsigned inp_desc_index_offset = type -
MENU_SETTINGS_INPUT_DESC_BEGIN;
unsigned inp_desc_user = inp_desc_index_offset /
(RARCH_FIRST_CUSTOM_BIND + 4);
unsigned inp_desc_button_index_offset = inp_desc_index_offset
- (inp_desc_user * (RARCH_FIRST_CUSTOM_BIND + 4));
settings_t *settings = config_get_ptr();

if (settings->uints.input_remap_ids[inp_desc_user][inp_desc_button_index_offset] > 0)
settings->uints.input_remap_ids[inp_desc_user][inp_desc_button_index_offset]--;

return 0;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment