This commit is contained in:
Twinaphex 2018-08-04 20:02:33 +02:00
parent 564c7805b0
commit 01103dcd23
5 changed files with 15 additions and 18 deletions

View File

@ -4119,7 +4119,7 @@ bool config_save_file(const char *path)
!retroarch_override_setting_is_set(size_settings[i].override, NULL))
config_set_int(conf,
size_settings[i].ident,
*size_settings[i].ptr);
(int)*size_settings[i].ptr);
free(size_settings);
}
@ -4397,7 +4397,7 @@ bool config_save_overrides(int override_type)
RARCH_LOG(" override: %s=%d\n",
size_overrides[i].ident, (*size_overrides[i].ptr));
config_set_int(conf, size_overrides[i].ident,
(*size_overrides[i].ptr));
(int)(*size_overrides[i].ptr));
}
}
for (i = 0; i < (unsigned)float_settings_size; i++)

2
deps/libFLAC/md5.c vendored
View File

@ -513,7 +513,7 @@ FLAC__bool FLAC__MD5Accumulate(FLAC__MD5Context *ctx, const FLAC__int32 * const
format_input_(&ctx->internal_buf, signal, channels, samples, bytes_per_sample);
FLAC__MD5Update(ctx, ctx->internal_buf.p8, bytes_needed);
FLAC__MD5Update(ctx, ctx->internal_buf.p8, (unsigned)bytes_needed);
return true;
}

View File

@ -675,14 +675,15 @@ int cheat_manager_initialize_memory(void *data, bool wraparound)
return 0 ;
}
cheat_manager_state.actual_memory_size = meminfo.size ;
cheat_manager_state.curr_memory_buf = meminfo.data ;
cheat_manager_state.total_memory_size = meminfo.size ;
cheat_manager_state.num_matches = (cheat_manager_state.total_memory_size*8)/((int)pow(2,cheat_manager_state.search_bit_size)) ;
//ensure we're aligned on 4-byte boundary
//if ( meminfo.size % 4 > 0 ) {
//cheat_manager_state.total_memory_size = cheat_manager_state.total_memory_size + (4 - (meminfo.size%4)) ;
//}
cheat_manager_state.actual_memory_size = (unsigned)meminfo.size ;
cheat_manager_state.curr_memory_buf = meminfo.data ;
cheat_manager_state.total_memory_size = (unsigned)meminfo.size ;
cheat_manager_state.num_matches = (cheat_manager_state.total_memory_size*8)/((int)pow(2,cheat_manager_state.search_bit_size)) ;
/* Ensure we're aligned on 4-byte boundary */
#if 0
if (meminfo.size % 4 > 0)
cheat_manager_state.total_memory_size = cheat_manager_state.total_memory_size + (4 - (meminfo.size%4)) ;
#endif
if ( is_search_initialization )
{
cheat_manager_state.prev_memory_buf = (uint8_t*) calloc(cheat_manager_state.total_memory_size, sizeof(uint8_t));
@ -810,7 +811,6 @@ int cheat_manager_search(enum cheat_search_type search_type)
unsigned char *curr = cheat_manager_state.curr_memory_buf ;
unsigned char *prev = cheat_manager_state.prev_memory_buf ;
unsigned int idx = 0 ;
unsigned int num_matches = 0 ;
unsigned int curr_val ;
unsigned int prev_val ;
unsigned int mask = 0 ;
@ -1172,7 +1172,6 @@ void cheat_manager_apply_retro_cheats(void)
unsigned int bytes_per_item = 1;
unsigned int bits = 8;
unsigned int curr_val = 0;
unsigned int num_added = 0;
bool run_cheat = true;
if ((!cheat_manager_state.cheats))
@ -1358,7 +1357,6 @@ void cheat_manager_apply_retro_cheats(void)
void cheat_manager_match_action(enum cheat_match_action_type match_action, unsigned int target_match_idx, unsigned int *address, unsigned int *address_mask,
unsigned int *prev_value, unsigned int *curr_value)
{
bool refresh = false;
unsigned int byte_part;
unsigned int idx;
unsigned int start_idx;

View File

@ -210,9 +210,9 @@ bool cheat_manager_copy_idx_to_working(unsigned idx);
bool cheat_manager_copy_working_to_idx(unsigned idx);
void cheat_manager_load_game_specific_cheats();
void cheat_manager_load_game_specific_cheats(void);
void cheat_manager_save_game_specific_cheats();
void cheat_manager_save_game_specific_cheats(void);
int cheat_manager_initialize_memory(void *data, bool wraparound);
int cheat_manager_search_exact(void *data, bool wraparound);
@ -226,7 +226,7 @@ int cheat_manager_search_eqplus(void *data, bool wraparound);
int cheat_manager_search_eqminus(void *data, bool wraparound);
int cheat_manager_add_matches(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx);
void cheat_manager_apply_retro_cheats() ;
void cheat_manager_apply_retro_cheats(void);
int cheat_manager_search(enum cheat_search_type search_type);
void cheat_manager_match_action(enum cheat_match_action_type match_action, unsigned int target_match_idx, unsigned int *address, unsigned int *address_mask,
unsigned int *prev_value, unsigned int *curr_value);

View File

@ -2886,7 +2886,6 @@ static int action_ok_cheat_delete(const char *path,
{
size_t new_selection_ptr;
char msg[256];
bool refresh = false;
unsigned int new_size = cheat_manager_get_size() - 1;
if( new_size >0 )