void menu_input_st_string_callback(void *userdata, const char *str) { if (str && *str) { rarch_setting_t *setting = NULL; const char *label = NULL; global_t *global = global_get_ptr(); menu_input_ctl(MENU_INPUT_CTL_KEYBOARD_LABEL_SETTING, &label); setting = menu_setting_find(label); if (setting) { menu_setting_set_with_string_representation(setting, str); menu_setting_generic(setting, false); } else { uint32_t hash_label = menu_hash_calculate(label); switch (hash_label) { case MENU_LABEL_VIDEO_SHADER_PRESET_SAVE_AS: menu_shader_manager_save_preset(str, false); break; case MENU_LABEL_CHEAT_FILE_SAVE_AS: cheat_manager_save(global->cheat, str); break; } } } menu_input_key_end_line(); }
void menu_input_st_string_callback(void *userdata, const char *str) { menu_handle_t *menu = menu_driver_resolve(); if (!menu) return; if (str && *str) { rarch_setting_t *current_setting = NULL; if ((current_setting = (rarch_setting_t*) setting_data_find_setting( menu->list_settings, menu->keyboard.label_setting))) menu_action_setting_set_current_string(current_setting, str); else { if (!strcmp(menu->keyboard.label_setting, "video_shader_preset_save_as")) menu_shader_manager_save_preset(str, false); else if (!strcmp(menu->keyboard.label_setting, "remap_file_save_as")) input_remapping_save_file(str); else if (!strcmp(menu->keyboard.label_setting, "cheat_file_save_as")) cheat_manager_save(g_extern.cheat, str); } } menu_input_key_end_line(); }
void menu_input_st_string_callback(void *userdata, const char *str) { menu_handle_t *menu = menu_driver_get_ptr(); if (!menu) return; if (str && *str) { rarch_setting_t *current_setting = NULL; global_t *global = global_get_ptr(); if ((current_setting = (rarch_setting_t*) setting_find_setting( menu->list_settings, menu->keyboard.label_setting))) { strlcpy(current_setting->value.string, str, current_setting->size); menu_setting_generic(current_setting); } else { if (!strcmp(menu->keyboard.label_setting, "video_shader_preset_save_as")) menu_shader_manager_save_preset(str, false); else if (!strcmp(menu->keyboard.label_setting, "remap_file_save_as")) input_remapping_save_file(str); else if (!strcmp(menu->keyboard.label_setting, "cheat_file_save_as")) cheat_manager_save(global->cheat, str); } } menu_input_key_end_line(); }
static void menu_input_search_callback(void *userdata, const char *str) { size_t idx; menu_handle_t *menu = menu_driver_get_ptr(); if (!menu) return; if (str && *str && file_list_search(menu->menu_list->selection_buf, str, &idx)) menu_navigation_set(&menu->navigation, idx, true); menu_input_key_end_line(); }
static void menu_input_search_callback(void *userdata, const char *str) { size_t idx = 0; menu_list_t *menu_list = menu_list_get_ptr(); menu_navigation_t *nav = menu_navigation_get_ptr(); if (!menu_list || !nav) return; if (str && *str && file_list_search(menu_list->selection_buf, str, &idx)) menu_navigation_set(nav, idx, true); menu_input_key_end_line(); }
void menu_input_st_uint_callback(void *userdata, const char *str) { if (str && *str) { rarch_setting_t *setting = NULL; const char *label = NULL; menu_input_ctl(MENU_INPUT_CTL_KEYBOARD_LABEL_SETTING, &label); setting = menu_setting_find(label); menu_setting_set_with_string_representation(setting, str); } menu_input_key_end_line(); }
void menu_input_st_uint_callback(void *userdata, const char *str) { menu_input_t *menu_input = menu_input_get_ptr(); if (!menu_input) return; if (str && *str) { rarch_setting_t *current_setting = NULL; if ((current_setting = menu_setting_find(menu_input->keyboard.label_setting))) setting_set_with_string_representation(current_setting, str); } menu_input_key_end_line(); }
void menu_input_st_uint_callback(void *userdata, const char *str) { menu_handle_t *menu = menu_driver_get_ptr(); if (!menu) return; if (str && *str) { rarch_setting_t *current_setting = NULL; if ((current_setting = menu_setting_find(menu->keyboard.label_setting))) *current_setting->value.unsigned_integer = strtoul(str, NULL, 0); } menu_input_key_end_line(); }
static void menu_input_search_callback(void *userdata, const char *str) { size_t idx = 0; file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0); if (!selection_buf) return; if (str && *str && file_list_search(selection_buf, str, &idx)) { bool scroll = true; menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &idx); menu_navigation_ctl(MENU_NAVIGATION_CTL_SET, &scroll); } menu_input_key_end_line(); }
void menu_input_st_cheat_callback(void *userdata, const char *str) { menu_input_t *menu_input = menu_input_get_ptr(); (void)userdata; if (!menu_input) return; if (str && *str) { unsigned cheat_index = menu_input->keyboard.type - MENU_SETTINGS_CHEAT_BEGIN; cheat_manager_set_code(cheat_index, str); } menu_input_key_end_line(); }
void menu_input_st_hex_callback(void *userdata, const char *str) { menu_input_t *menu_input = menu_input_get_ptr(); if (!menu_input) return; if (str && *str) { rarch_setting_t *current_setting = NULL; if ((current_setting = menu_setting_find(menu_input->keyboard.label_setting))) if (str[0] == '#') str++; *current_setting->value.unsigned_integer = strtoul(str, NULL, 16); } menu_input_key_end_line(); }
void menu_input_st_cheat_callback(void *userdata, const char *str) { global_t *global = global_get_ptr(); cheat_manager_t *cheat = global ? global->cheat : NULL; menu_input_t *menu_input = menu_input_get_ptr(); (void)userdata; if (!menu_input || !cheat) return; if (cheat && str && *str) { unsigned cheat_index = menu_input->keyboard.type - MENU_SETTINGS_CHEAT_BEGIN; cheat_manager_set_code(cheat, cheat_index, str); } menu_input_key_end_line(); }
void menu_input_st_cheat_callback(void *userdata, const char *str) { cheat_manager_t *cheat = g_extern.cheat; menu_handle_t *menu = (menu_handle_t*)userdata; if (!menu) return; if (cheat && str && *str) { unsigned cheat_index = menu->keyboard.type - MENU_SETTINGS_CHEAT_BEGIN; RARCH_LOG("cheat_index is: %d\n", cheat_index); cheat->cheats[cheat_index].code = strdup(str); cheat->cheats[cheat_index].state = true; } menu_input_key_end_line(); }
void menu_input_st_hex_callback(void *userdata, const char *str) { if (str && *str) { rarch_setting_t *setting = NULL; const char *label = NULL; menu_input_ctl(MENU_INPUT_CTL_KEYBOARD_LABEL_SETTING, &label); setting = menu_setting_find(label); if (setting) { unsigned *ptr = (unsigned*)setting_get_ptr(setting); if (str[0] == '#') str++; *ptr = strtoul(str, NULL, 16); } } menu_input_key_end_line(); }
void menu_input_st_string_callback(void *userdata, const char *str) { menu_input_t *menu_input = menu_input_get_ptr(); if (!menu_input) return; if (str && *str) { global_t *global = global_get_ptr(); rarch_setting_t *current_setting = menu_setting_find(menu_input->keyboard.label_setting); if (current_setting) { setting_set_with_string_representation(current_setting, str); menu_setting_generic(current_setting, false); } else { uint32_t hash_label = menu_hash_calculate(menu_input->keyboard.label_setting); switch (hash_label) { case MENU_LABEL_VIDEO_SHADER_PRESET_SAVE_AS: menu_shader_manager_save_preset(str, false); break; case MENU_LABEL_REMAP_FILE_SAVE_AS: input_remapping_save_file(str); break; case MENU_LABEL_CHEAT_FILE_SAVE_AS: cheat_manager_save(global->cheat, str); break; } } } menu_input_key_end_line(); }