This commit is contained in:
twinaphex 2019-08-10 14:23:00 +02:00
parent 41c6345381
commit baf8c71545
3 changed files with 158 additions and 156 deletions

View File

@ -390,9 +390,10 @@ static void cheat_manager_load_cb_second_pass(char *key, char *value)
bool cheat_manager_load(const char *path, bool append)
{
unsigned orig_size;
unsigned cheats = 0, i;
config_file_cb_t cb;
unsigned orig_size = 0;
unsigned cheats = 0;
unsigned i = 0;
config_file_t *conf = NULL;
cb.config_file_new_entry_cb = cheat_manager_load_cb_first_pass;
@ -1296,9 +1297,9 @@ void cheat_manager_apply_retro_cheats(void)
for (i = 0; i < cheat_manager_state.size; i++)
{
unsigned char *curr;
unsigned int idx;
unsigned char *curr = NULL;
bool set_value = false;
unsigned int idx = 0;
unsigned int value_to_set = 0;
unsigned int repeat_iter = 0;
unsigned int address_mask = cheat_manager_state.cheats[i].address_mask;
@ -1468,6 +1469,7 @@ 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)
{

View File

@ -2841,7 +2841,7 @@ static void command_event_init_cheats(void)
cheat_manager_alloc_if_empty();
cheat_manager_load_game_specific_cheats();
if (settings != NULL && settings->bools.apply_cheats_after_load)
if (settings && settings->bools.apply_cheats_after_load)
cheat_manager_apply_cheats();
}
@ -3827,7 +3827,7 @@ bool command_event(enum event_command cmd, void *data)
case CMD_EVENT_LOAD_STATE:
/* Immutable - disallow savestate load when
* we absolutely cannot change game state. */
if (bsv_movie_state_handle != NULL)
if (bsv_movie_state_handle)
return false;
#ifdef HAVE_CHEEVOS
@ -17308,7 +17308,7 @@ void video_driver_set_stub_frame(void)
void video_driver_unset_stub_frame(void)
{
if (frame_bak != NULL)
if (frame_bak)
current_video->frame = frame_bak;
frame_bak = NULL;