mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 12:40:23 +00:00
Reduce references to global->cheat
This commit is contained in:
parent
dbb3d8f770
commit
e0ec68a73d
4
cheats.c
4
cheats.c
@ -330,8 +330,10 @@ void cheat_manager_update(cheat_manager_t *handle, unsigned handle_idx)
|
||||
RARCH_LOG("%s\n", msg);
|
||||
}
|
||||
|
||||
void cheat_manager_toggle_index(cheat_manager_t *handle, unsigned i)
|
||||
void cheat_manager_toggle_index(unsigned i)
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
cheat_manager_t *handle = global->cheat;
|
||||
if (!handle)
|
||||
return;
|
||||
|
||||
|
2
cheats.h
2
cheats.h
@ -57,7 +57,7 @@ void cheat_manager_apply_cheats(void);
|
||||
|
||||
void cheat_manager_update(cheat_manager_t *handle, unsigned handle_idx);
|
||||
|
||||
void cheat_manager_toggle_index(cheat_manager_t *handle, unsigned i);
|
||||
void cheat_manager_toggle_index(unsigned i);
|
||||
|
||||
unsigned cheat_manager_get_buf_size(void);
|
||||
|
||||
|
@ -71,13 +71,7 @@ int shader_action_parameter_preset_right(unsigned type, const char *label,
|
||||
int generic_action_cheat_toggle(size_t idx, unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
cheat_manager_t *cheat = global->cheat;
|
||||
|
||||
if (!cheat)
|
||||
return -1;
|
||||
|
||||
cheat_manager_toggle_index(cheat, idx);
|
||||
cheat_manager_toggle_index(idx);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user