mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 16:09:47 +00:00
Rename local variables named 'index' elsewhere
This commit is contained in:
parent
def41a573f
commit
3e45884b67
@ -18,13 +18,13 @@
|
||||
#include "general.h"
|
||||
|
||||
void rarch_playlist_load_content(content_playlist_t *playlist,
|
||||
unsigned index)
|
||||
unsigned idx)
|
||||
{
|
||||
const char *path = NULL;
|
||||
const char *core_path = NULL;
|
||||
|
||||
content_playlist_get_index(playlist,
|
||||
index, &path, &core_path, NULL);
|
||||
idx, &path, &core_path, NULL);
|
||||
|
||||
strlcpy(g_settings.libretro, core_path, sizeof(g_settings.libretro));
|
||||
|
||||
|
@ -42,7 +42,7 @@ struct content_playlist
|
||||
};
|
||||
|
||||
void content_playlist_get_index(content_playlist_t *playlist,
|
||||
size_t index,
|
||||
size_t idx,
|
||||
const char **path, const char **core_path,
|
||||
const char **core_name)
|
||||
{
|
||||
@ -50,11 +50,11 @@ void content_playlist_get_index(content_playlist_t *playlist,
|
||||
return;
|
||||
|
||||
if (path)
|
||||
*path = playlist->entries[index].path;
|
||||
*path = playlist->entries[idx].path;
|
||||
if (core_path)
|
||||
*core_path = playlist->entries[index].core_path;
|
||||
*core_path = playlist->entries[idx].core_path;
|
||||
if (core_name)
|
||||
*core_name = playlist->entries[index].core_name;
|
||||
*core_name = playlist->entries[idx].core_name;
|
||||
}
|
||||
|
||||
static void content_playlist_free_entry(
|
||||
|
@ -2116,7 +2116,7 @@ extern unsigned menu_current_gx_resolution;
|
||||
|
||||
static int get_fallback_label(char *type_str,
|
||||
size_t type_str_size, unsigned *w, unsigned type,
|
||||
const char *menu_label, const char *label, unsigned index)
|
||||
const char *menu_label, const char *label, unsigned idx)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
|
@ -79,8 +79,8 @@ rarch_setting_t setting_data_string_setting(enum setting_type type,
|
||||
change_handler_t change_handler, change_handler_t read_handler);
|
||||
|
||||
rarch_setting_t setting_data_bind_setting(const char* name,
|
||||
const char* description, struct retro_keybind* target, uint32_t index,
|
||||
uint32_t index_offset,
|
||||
const char* description, struct retro_keybind* target, uint32_t idx,
|
||||
uint32_t idx_offset,
|
||||
const struct retro_keybind* default_value, const char *group,
|
||||
const char *subgroup);
|
||||
|
||||
@ -90,7 +90,7 @@ int setting_data_get_description(const char *label, char *msg,
|
||||
#ifdef HAVE_MENU
|
||||
void setting_data_get_label(char *type_str,
|
||||
size_t type_str_size, unsigned *w, unsigned type,
|
||||
const char *menu_label, const char *label, unsigned index);
|
||||
const char *menu_label, const char *label, unsigned idx);
|
||||
#endif
|
||||
|
||||
rarch_setting_t* setting_data_new(unsigned mask);
|
||||
|
@ -66,8 +66,8 @@ void settings_list_current_add_bind_type(
|
||||
rarch_setting_info_t *list_info,
|
||||
unsigned type)
|
||||
{
|
||||
unsigned index = list_info->index - 1;
|
||||
(*list)[index].bind_type = type;
|
||||
unsigned idx = list_info->index - 1;
|
||||
(*list)[idx].bind_type = type;
|
||||
}
|
||||
|
||||
void settings_list_current_add_flags(
|
||||
@ -75,13 +75,13 @@ void settings_list_current_add_flags(
|
||||
rarch_setting_info_t *list_info,
|
||||
unsigned values)
|
||||
{
|
||||
unsigned index = list_info->index - 1;
|
||||
(*list)[index].flags |= values;
|
||||
unsigned idx = list_info->index - 1;
|
||||
(*list)[idx].flags |= values;
|
||||
|
||||
if (values & SD_FLAG_IS_DEFERRED)
|
||||
{
|
||||
(*list)[index].deferred_handler = (*list)[index].change_handler;
|
||||
(*list)[index].change_handler = null_write_handler;
|
||||
(*list)[idx].deferred_handler = (*list)[idx].change_handler;
|
||||
(*list)[idx].change_handler = null_write_handler;
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,13 +91,13 @@ void settings_list_current_add_range(
|
||||
float min, float max, float step,
|
||||
bool enforce_minrange_enable, bool enforce_maxrange_enable)
|
||||
{
|
||||
unsigned index = list_info->index - 1;
|
||||
unsigned idx = list_info->index - 1;
|
||||
|
||||
(*list)[index].min = min;
|
||||
(*list)[index].step = step;
|
||||
(*list)[index].max = max;
|
||||
(*list)[index].enforce_minrange = enforce_minrange_enable;
|
||||
(*list)[index].enforce_maxrange = enforce_maxrange_enable;
|
||||
(*list)[idx].min = min;
|
||||
(*list)[idx].step = step;
|
||||
(*list)[idx].max = max;
|
||||
(*list)[idx].enforce_minrange = enforce_minrange_enable;
|
||||
(*list)[idx].enforce_maxrange = enforce_maxrange_enable;
|
||||
|
||||
settings_list_current_add_flags(list, list_info, SD_FLAG_HAS_RANGE);
|
||||
}
|
||||
@ -107,8 +107,8 @@ void settings_list_current_add_values(
|
||||
rarch_setting_info_t *list_info,
|
||||
const char *values)
|
||||
{
|
||||
unsigned index = list_info->index - 1;
|
||||
(*list)[index].values = values;
|
||||
unsigned idx = list_info->index - 1;
|
||||
(*list)[idx].values = values;
|
||||
}
|
||||
|
||||
void settings_list_current_add_cmd(
|
||||
@ -116,8 +116,8 @@ void settings_list_current_add_cmd(
|
||||
rarch_setting_info_t *list_info,
|
||||
unsigned values)
|
||||
{
|
||||
unsigned index = list_info->index - 1;
|
||||
(*list)[index].cmd_trigger.idx = values;
|
||||
unsigned idx = list_info->index - 1;
|
||||
(*list)[idx].cmd_trigger.idx = values;
|
||||
}
|
||||
|
||||
void settings_list_free(rarch_setting_t *list)
|
||||
|
@ -62,7 +62,7 @@ void string_list_free(struct string_list *list);
|
||||
void string_list_join_concat(char *buffer, size_t size,
|
||||
const struct string_list *list, const char *sep);
|
||||
|
||||
void string_list_set(struct string_list *list, unsigned index,
|
||||
void string_list_set(struct string_list *list, unsigned idx,
|
||||
const char *str);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Loading…
Reference in New Issue
Block a user