mirror of
https://github.com/libretro/RetroArch
synced 2025-01-31 06:32:48 +00:00
Style nits
This commit is contained in:
parent
e04d3da985
commit
1d962e960b
@ -577,7 +577,7 @@ static void menu_action_setting_disp_set_label_input_desc_kbd(
|
||||
|
||||
for (key_id = 0; key_id < RARCH_MAX_KEYS - 1; key_id++)
|
||||
{
|
||||
if(remap_id == key_descriptors[key_id].key)
|
||||
if (remap_id == key_descriptors[key_id].key)
|
||||
break;
|
||||
}
|
||||
|
||||
@ -606,7 +606,7 @@ static void menu_action_setting_disp_set_label_cheat(
|
||||
|
||||
if (cheat_index < cheat_manager_get_buf_size())
|
||||
{
|
||||
if ( cheat_manager_state.cheats[cheat_index].handler == CHEAT_HANDLER_TYPE_EMU)
|
||||
if (cheat_manager_state.cheats[cheat_index].handler == CHEAT_HANDLER_TYPE_EMU)
|
||||
{
|
||||
snprintf(s, len, "(%s) : %s",
|
||||
cheat_manager_get_code_state(cheat_index) ?
|
||||
@ -1672,7 +1672,7 @@ static void menu_action_setting_disp_set_label_setting_string(file_list_t* list,
|
||||
|
||||
*w = 19;
|
||||
|
||||
if ( setting->value.target.string != NULL )
|
||||
if (setting->value.target.string != NULL)
|
||||
strlcpy(s, setting->value.target.string, len);
|
||||
|
||||
strlcpy(s2, path, len2);
|
||||
|
@ -853,19 +853,19 @@ int generic_action_ok_displaylist_push(const char *path,
|
||||
if (setting)
|
||||
setting->max = cheat_manager_get_size()-1 ;
|
||||
setting = menu_setting_find(msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_VALUE));
|
||||
if ( setting )
|
||||
if (setting)
|
||||
setting->max = (int) pow(2,pow((double) 2,cheat_manager_state.working_cheat.memory_search_size))-1;
|
||||
setting = menu_setting_find(msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_RUMBLE_VALUE));
|
||||
if (setting)
|
||||
setting->max = (int) pow(2,pow((double) 2,cheat_manager_state.working_cheat.memory_search_size))-1;
|
||||
setting = menu_setting_find(msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_ADDRESS_BIT_POSITION));
|
||||
if ( setting )
|
||||
if (setting)
|
||||
{
|
||||
int max_bit_position = cheat_manager_state.working_cheat.memory_search_size<3 ? 7 : 0 ;
|
||||
setting->max = max_bit_position ;
|
||||
}
|
||||
setting = menu_setting_find(msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_ADDRESS));
|
||||
if ( setting )
|
||||
if (setting)
|
||||
{
|
||||
cheat_manager_state.browse_address = *setting->value.target.unsigned_integer ;
|
||||
}
|
||||
@ -875,13 +875,13 @@ int generic_action_ok_displaylist_push(const char *path,
|
||||
case ACTION_OK_DL_CHEAT_SEARCH_SETTINGS_LIST:
|
||||
{
|
||||
rarch_setting_t *setting = menu_setting_find(msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_SEARCH_EXACT));
|
||||
if ( setting)
|
||||
if (setting)
|
||||
setting->max = (int) pow(2,pow((double) 2,cheat_manager_state.search_bit_size))-1;
|
||||
setting = menu_setting_find(msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_SEARCH_EQPLUS));
|
||||
if ( setting )
|
||||
if (setting)
|
||||
setting->max = (int) pow(2,pow((double) 2,cheat_manager_state.search_bit_size))-1;
|
||||
setting = menu_setting_find(msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_SEARCH_EQMINUS));
|
||||
if ( setting )
|
||||
if (setting)
|
||||
setting->max = (int) pow(2,pow((double) 2,cheat_manager_state.search_bit_size))-1;
|
||||
action_ok_dl_lbl(action_ok_dl_to_enum(action_type), DISPLAYLIST_GENERIC);
|
||||
break ;
|
||||
@ -2867,9 +2867,9 @@ static int action_ok_cheat_copy_before(const char *path,
|
||||
|
||||
memcpy(&tmp, &cheat_manager_state.cheats[cheat_manager_state.working_cheat.idx], sizeof(struct item_cheat )) ;
|
||||
tmp.idx = cheat_manager_state.working_cheat.idx ;
|
||||
if ( tmp.code != NULL )
|
||||
if (tmp.code)
|
||||
tmp.code = strdup(tmp.code) ;
|
||||
if ( tmp.desc != NULL )
|
||||
if (tmp.desc)
|
||||
tmp.desc = strdup(tmp.desc) ;
|
||||
|
||||
for (i = cheat_manager_state.size-2 ; i >=(int)tmp.idx ; i--)
|
||||
@ -2906,9 +2906,9 @@ static int action_ok_cheat_copy_after(const char *path,
|
||||
|
||||
memcpy(&tmp, &cheat_manager_state.cheats[cheat_manager_state.working_cheat.idx], sizeof(struct item_cheat )) ;
|
||||
tmp.idx = cheat_manager_state.working_cheat.idx+1 ;
|
||||
if ( tmp.code != NULL )
|
||||
if (tmp.code)
|
||||
tmp.code = strdup(tmp.code) ;
|
||||
if ( tmp.desc != NULL )
|
||||
if (tmp.desc)
|
||||
tmp.desc = strdup(tmp.desc) ;
|
||||
|
||||
for (i = cheat_manager_state.size-2 ; i >= (int)(cheat_manager_state.working_cheat.idx+1); i--)
|
||||
@ -2933,19 +2933,19 @@ static int action_ok_cheat_copy_after(const char *path,
|
||||
static int action_ok_cheat_delete(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
size_t new_selection_ptr;
|
||||
char msg[256];
|
||||
unsigned int new_size = cheat_manager_get_size() - 1;
|
||||
size_t new_selection_ptr = 0;
|
||||
unsigned int new_size = cheat_manager_get_size() - 1;
|
||||
|
||||
if( new_size >0 )
|
||||
if (new_size >0)
|
||||
{
|
||||
unsigned i;
|
||||
if ( cheat_manager_state.cheats[cheat_manager_state.working_cheat.idx].code != NULL )
|
||||
if (cheat_manager_state.cheats[cheat_manager_state.working_cheat.idx].code)
|
||||
{
|
||||
free(cheat_manager_state.cheats[cheat_manager_state.working_cheat.idx].code) ;
|
||||
cheat_manager_state.cheats[cheat_manager_state.working_cheat.idx].code = NULL ;
|
||||
}
|
||||
if ( cheat_manager_state.cheats[cheat_manager_state.working_cheat.idx].desc != NULL )
|
||||
if (cheat_manager_state.cheats[cheat_manager_state.working_cheat.idx].desc)
|
||||
{
|
||||
free(cheat_manager_state.cheats[cheat_manager_state.working_cheat.idx].desc) ;
|
||||
cheat_manager_state.cheats[cheat_manager_state.working_cheat.idx].desc = NULL ;
|
||||
@ -5377,7 +5377,7 @@ static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
|
||||
BIND_ACTION_OK(cbs, action_ok_push_generic_list);
|
||||
break;
|
||||
case FILE_TYPE_CHEAT:
|
||||
if ( menu_label_hash == MENU_LABEL_CHEAT_FILE_LOAD_APPEND )
|
||||
if (menu_label_hash == MENU_LABEL_CHEAT_FILE_LOAD_APPEND)
|
||||
{
|
||||
BIND_ACTION_OK(cbs, action_ok_cheat_file_load_append);
|
||||
}
|
||||
|
@ -590,16 +590,12 @@ static int action_bind_sublabel_cheat_desc(
|
||||
{
|
||||
unsigned offset = (type - MENU_SETTINGS_CHEAT_BEGIN);
|
||||
|
||||
if ( cheat_manager_state.cheats )
|
||||
if (cheat_manager_state.cheats)
|
||||
{
|
||||
if ( cheat_manager_state.cheats[offset].handler == CHEAT_HANDLER_TYPE_EMU)
|
||||
{
|
||||
if (cheat_manager_state.cheats[offset].handler == CHEAT_HANDLER_TYPE_EMU)
|
||||
snprintf(s, len, "Emulator-Handled") ;
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(s, len, "RetroArch-Handled") ;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user