FrontendCommon: Add auto cheat loading option

This commit is contained in:
Connor McLaughlin
2020-09-09 23:44:02 +10:00
parent bf6b4514a0
commit 03f052e12e
8 changed files with 190 additions and 18 deletions

View File

@@ -68,10 +68,16 @@ public:
ALWAYS_INLINE const CheatCode& GetCode(u32 i) const { return m_codes[i]; }
ALWAYS_INLINE CheatCode& GetCode(u32 i) { return m_codes[i]; }
ALWAYS_INLINE u32 GetCodeCount() const { return static_cast<u32>(m_codes.size()); }
ALWAYS_INLINE bool IsCodeEnabled(u32 index) const { return m_codes[index].enabled; }
void AddCode(CheatCode cc);
void RemoveCode(u32 i);
u32 GetEnabledCodeCount() const;
void EnableCode(u32 index);
void DisableCode(u32 index);
void SetCodeEnabled(u32 index, bool state);
static std::optional<Format> DetectFileFormat(const char* filename);
bool LoadFromFile(const char* filename, Format format);
@@ -82,6 +88,8 @@ public:
void Apply();
void ApplyCode(u32 index);
private:
std::vector<CheatCode> m_codes;
};