Cheats: Make FormatCodeForFile() public

Needed for Android.
This commit is contained in:
Stenzek 2025-04-20 00:23:22 +10:00
parent 1caf45cf62
commit f4df18b7cf
No known key found for this signature in database
2 changed files with 3 additions and 1 deletions

View File

@ -210,7 +210,6 @@ static std::vector<std::string> FindChtFilesOnDisk(const std::string_view serial
static bool ExtractCodeInfo(CodeInfoList* dst, const std::string_view file_data, bool from_database, bool stop_on_error,
Error* error);
static void AppendCheatToList(CodeInfoList* dst, CodeInfo code);
static std::string FormatCodeForFile(const CodeInfo& code);
static bool ShouldLoadDatabaseCheats();
static bool AreAnyPatchesEnabled();

View File

@ -104,6 +104,9 @@ extern const CodeInfo* FindCodeInInfoList(const CodeInfoList& list, const std::s
/// Searches for a given code by name.
extern CodeInfo* FindCodeInInfoList(CodeInfoList& list, const std::string_view name);
/// Formats the given cheat code in the format that it would be saved to a file.
extern std::string FormatCodeForFile(const CodeInfo& code);
/// Imports all codes from the provided string.
extern bool ImportCodesFromString(CodeInfoList* dst, const std::string_view file_contents, FileFormat file_format,
bool stop_on_error, Error* error);