mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-19 15:28:25 +00:00
Reduce scope of global->cheat
This commit is contained in:
parent
43abd39f6a
commit
b8eba00a7e
4
cheats.c
4
cheats.c
@ -107,7 +107,7 @@ void cheat_manager_set_code(cheat_manager_t *handle, unsigned i, const char *str
|
||||
*
|
||||
* Returns: true (1) if successful, otherwise false (0).
|
||||
**/
|
||||
bool cheat_manager_save(cheat_manager_t *handle, const char *path)
|
||||
bool cheat_manager_save(const char *path)
|
||||
{
|
||||
bool ret;
|
||||
unsigned i;
|
||||
@ -115,6 +115,8 @@ bool cheat_manager_save(cheat_manager_t *handle, const char *path)
|
||||
char buf[PATH_MAX_LENGTH] = {0};
|
||||
char cheats_file[PATH_MAX_LENGTH] = {0};
|
||||
settings_t *settings = config_get_ptr();
|
||||
global_t *global = global_get_ptr();
|
||||
cheat_manager_t *handle = global->cheat;
|
||||
|
||||
fill_pathname_join(buf, settings->cheat_database,
|
||||
path, sizeof(buf));
|
||||
|
2
cheats.h
2
cheats.h
@ -39,7 +39,7 @@ cheat_manager_t *cheat_manager_load(const char *path);
|
||||
*
|
||||
* Returns: true (1) if successful, otherwise false (0).
|
||||
**/
|
||||
bool cheat_manager_save(cheat_manager_t *handle, const char *path);
|
||||
bool cheat_manager_save(const char *path);
|
||||
|
||||
bool cheat_manager_realloc(cheat_manager_t *handle, unsigned new_size);
|
||||
|
||||
|
@ -373,7 +373,6 @@ void menu_input_st_string_callback(void *userdata, const char *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);
|
||||
|
||||
@ -394,7 +393,7 @@ void menu_input_st_string_callback(void *userdata, const char *str)
|
||||
menu_shader_manager_save_preset(str, false);
|
||||
break;
|
||||
case MENU_LABEL_CHEAT_FILE_SAVE_AS:
|
||||
cheat_manager_save(global->cheat, str);
|
||||
cheat_manager_save(str);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user