From f5ac89506275ff571c6c034eab99cd3b6ad3e28a Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Wed, 27 Feb 2019 04:47:43 -0800 Subject: [PATCH] dmnt-cheat: revise cheatentry definition --- stratosphere/dmnt/source/dmnt_cheat_service.hpp | 2 +- stratosphere/dmnt/source/dmnt_cheat_types.hpp | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/stratosphere/dmnt/source/dmnt_cheat_service.hpp b/stratosphere/dmnt/source/dmnt_cheat_service.hpp index 7ceb91032..02aca63d5 100644 --- a/stratosphere/dmnt/source/dmnt_cheat_service.hpp +++ b/stratosphere/dmnt/source/dmnt_cheat_service.hpp @@ -61,7 +61,7 @@ class DmntCheatService final : public IServiceObject { Result GetCheats(OutBuffer cheats, Out out_count, u64 offset); Result GetCheatById(OutBuffer cheat, u32 cheat_id); Result ToggleCheat(u32 cheat_id); - Result AddCheat(InBuffer cheat); + Result AddCheat(InBuffer cheat, Out out_cheat_id, bool enabled); Result RemoveCheat(u32 cheat_id); Result GetFrozenAddressCount(Out out_count); diff --git a/stratosphere/dmnt/source/dmnt_cheat_types.hpp b/stratosphere/dmnt/source/dmnt_cheat_types.hpp index 7b2069dd2..4e7a4602e 100644 --- a/stratosphere/dmnt/source/dmnt_cheat_types.hpp +++ b/stratosphere/dmnt/source/dmnt_cheat_types.hpp @@ -32,9 +32,14 @@ struct CheatProcessMetadata { u8 main_nso_build_id[0x20]; }; +struct CheatDefinition { + char readable_name[0x40]; + uint32_t num_opcodes; + uint32_t opcodes[0x100]; +}; + struct CheatEntry { bool enabled; uint32_t cheat_id; - char readable_name[0x20]; - uint32_t opcodes[0x100]; + CheatDefinition definition; }; \ No newline at end of file