mirror of
https://github.com/libretro/RetroArch.git
synced 2025-12-28 05:24:00 +00:00
(cheat_manager) No more dependency on configuration.h
Some checks failed
CI 3DS / build (push) Waiting to run
CI Android / build (push) Waiting to run
CI DOS/DJGPP / build (push) Waiting to run
CI Emscripten / build (push) Waiting to run
CI GameCube / build (push) Waiting to run
CI Linux (i686) / build (push) Waiting to run
CI Windows (MSVC) / msvc (Debug, x64, 2019) (push) Waiting to run
CI Windows (MSVC) / msvc (Debug, x64, 2022) (push) Waiting to run
CI Windows (MSVC) / msvc (Release, x64, 2019) (push) Waiting to run
CI Windows (MSVC) / msvc (Release, x64, 2022) (push) Waiting to run
CI Windows (MSVC) / msvc (Release, x64, UWP) (push) Waiting to run
CI Windows (MSVC) / msvc (ReleaseAngle, x64, UWP) (push) Waiting to run
CI Windows (MSYS2) / msys2-build-test (CLANG64) (push) Waiting to run
CI Windows (MSYS2) / msys2-build-test (MINGW64) (push) Waiting to run
CI Windows (MSYS2) / msys2-build-test (UCRT64) (push) Waiting to run
CI macOS / build (push) Waiting to run
CI Miyoo ARM32 / build (push) Waiting to run
CI PS2 / build (push) Waiting to run
CI PS4/ORBIS / build (push) Waiting to run
CI PSP / build (push) Waiting to run
CI PSVita / build (push) Waiting to run
CI RS90 Odbeta MIPS32 / build (push) Waiting to run
CI RetroFW MIPS32 / build (push) Waiting to run
CI Switch/libnx / build (push) Waiting to run
CI Wii / build (push) Waiting to run
CI WiiU / build (push) Waiting to run
CI Windows i686 (MXE) / build (push) Waiting to run
CI Windows x64 (MXE) / build (push) Waiting to run
RetroArch CI / linux-c89 (push) Waiting to run
CI webOS / build (push) Waiting to run
Crowdin Workflow / sync (push) Has been cancelled
Some checks failed
CI 3DS / build (push) Waiting to run
CI Android / build (push) Waiting to run
CI DOS/DJGPP / build (push) Waiting to run
CI Emscripten / build (push) Waiting to run
CI GameCube / build (push) Waiting to run
CI Linux (i686) / build (push) Waiting to run
CI Windows (MSVC) / msvc (Debug, x64, 2019) (push) Waiting to run
CI Windows (MSVC) / msvc (Debug, x64, 2022) (push) Waiting to run
CI Windows (MSVC) / msvc (Release, x64, 2019) (push) Waiting to run
CI Windows (MSVC) / msvc (Release, x64, 2022) (push) Waiting to run
CI Windows (MSVC) / msvc (Release, x64, UWP) (push) Waiting to run
CI Windows (MSVC) / msvc (ReleaseAngle, x64, UWP) (push) Waiting to run
CI Windows (MSYS2) / msys2-build-test (CLANG64) (push) Waiting to run
CI Windows (MSYS2) / msys2-build-test (MINGW64) (push) Waiting to run
CI Windows (MSYS2) / msys2-build-test (UCRT64) (push) Waiting to run
CI macOS / build (push) Waiting to run
CI Miyoo ARM32 / build (push) Waiting to run
CI PS2 / build (push) Waiting to run
CI PS4/ORBIS / build (push) Waiting to run
CI PSP / build (push) Waiting to run
CI PSVita / build (push) Waiting to run
CI RS90 Odbeta MIPS32 / build (push) Waiting to run
CI RetroFW MIPS32 / build (push) Waiting to run
CI Switch/libnx / build (push) Waiting to run
CI Wii / build (push) Waiting to run
CI WiiU / build (push) Waiting to run
CI Windows i686 (MXE) / build (push) Waiting to run
CI Windows x64 (MXE) / build (push) Waiting to run
RetroArch CI / linux-c89 (push) Waiting to run
CI webOS / build (push) Waiting to run
Crowdin Workflow / sync (push) Has been cancelled
This commit is contained in:
parent
d766a5b71e
commit
ef7b9830db
@ -43,7 +43,6 @@
|
||||
#include "cheat_manager.h"
|
||||
|
||||
#include "msg_hash.h"
|
||||
#include "configuration.h"
|
||||
#include "retroarch.h"
|
||||
#include "runloop.h"
|
||||
#include "dynamic.h"
|
||||
@ -632,6 +631,7 @@ void cheat_manager_update(cheat_manager_t *handle, unsigned handle_idx)
|
||||
}
|
||||
|
||||
void cheat_manager_toggle_index(bool apply_cheats_after_toggle,
|
||||
bool notification_show_cheats_applied,
|
||||
unsigned i)
|
||||
{
|
||||
cheat_manager_t *cheat_st = &cheat_manager_state;
|
||||
@ -642,17 +642,17 @@ void cheat_manager_toggle_index(bool apply_cheats_after_toggle,
|
||||
cheat_manager_update(cheat_st, i);
|
||||
|
||||
if (apply_cheats_after_toggle)
|
||||
cheat_manager_apply_cheats(config_get_ptr()->bools.notification_show_cheats_applied);
|
||||
cheat_manager_apply_cheats(notification_show_cheats_applied);
|
||||
}
|
||||
|
||||
void cheat_manager_toggle(void)
|
||||
void cheat_manager_toggle(bool notification_show_cheats_applied)
|
||||
{
|
||||
cheat_manager_t *cheat_st = &cheat_manager_state;
|
||||
if (!cheat_st->cheats || cheat_st->size == 0)
|
||||
return;
|
||||
|
||||
cheat_st->cheats[cheat_st->ptr].state ^= true;
|
||||
cheat_manager_apply_cheats(config_get_ptr()->bools.notification_show_cheats_applied);
|
||||
cheat_manager_apply_cheats(notification_show_cheats_applied);
|
||||
cheat_manager_update(cheat_st, cheat_st->ptr);
|
||||
}
|
||||
|
||||
|
||||
@ -215,13 +215,14 @@ void cheat_manager_index_next(void);
|
||||
|
||||
void cheat_manager_index_prev(void);
|
||||
|
||||
void cheat_manager_toggle(void);
|
||||
void cheat_manager_toggle(bool notification_show_cheats_applied);
|
||||
|
||||
void cheat_manager_apply_cheats(bool notification_show_cheats_applied);
|
||||
|
||||
void cheat_manager_update(cheat_manager_t *handle, unsigned handle_idx);
|
||||
|
||||
void cheat_manager_toggle_index(bool apply_cheats_after_toggle,
|
||||
bool notification_show_cheats_applied,
|
||||
unsigned i);
|
||||
|
||||
unsigned cheat_manager_get_buf_size(void);
|
||||
|
||||
@ -161,7 +161,9 @@ const char *cmd_cheat_get_code(unsigned index)
|
||||
|
||||
void cmd_cheat_toggle_index(bool apply_cheats_after_toggle, unsigned index)
|
||||
{
|
||||
cheat_manager_toggle_index(apply_cheats_after_toggle, index);
|
||||
cheat_manager_toggle_index(apply_cheats_after_toggle,
|
||||
config_get_ptr()->bools.notification_show_cheats_applied,
|
||||
index);
|
||||
}
|
||||
|
||||
bool cmd_cheat_get_code_state(unsigned index)
|
||||
|
||||
@ -112,8 +112,8 @@ int generic_action_cheat_toggle(size_t idx, unsigned type, const char *label,
|
||||
settings_t *settings = config_get_ptr();
|
||||
bool apply_cheats_after_toggle = settings->bools.apply_cheats_after_toggle;
|
||||
|
||||
cheat_manager_toggle_index(
|
||||
apply_cheats_after_toggle,
|
||||
cheat_manager_toggle_index(apply_cheats_after_toggle,
|
||||
settings->bools.notification_show_cheats_applied,
|
||||
(unsigned)idx);
|
||||
|
||||
return 0;
|
||||
|
||||
@ -3019,7 +3019,7 @@ bool command_event(enum event_command cmd, void *data)
|
||||
break;
|
||||
case CMD_EVENT_CHEAT_TOGGLE:
|
||||
#ifdef HAVE_CHEATS
|
||||
cheat_manager_toggle();
|
||||
cheat_manager_toggle(settings->bools.notification_show_cheats_applied);
|
||||
#endif
|
||||
break;
|
||||
case CMD_EVENT_SHADER_NEXT:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user