From f4df18b7cf01e88f2c5021a32d81c854063214cd Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 20 Apr 2025 00:23:22 +1000 Subject: [PATCH] Cheats: Make FormatCodeForFile() public Needed for Android. --- src/core/cheats.cpp | 1 - src/core/cheats.h | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/cheats.cpp b/src/core/cheats.cpp index 5697739ab..708b107d1 100644 --- a/src/core/cheats.cpp +++ b/src/core/cheats.cpp @@ -210,7 +210,6 @@ static std::vector 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(); diff --git a/src/core/cheats.h b/src/core/cheats.h index 0805d6756..08ced2210 100644 --- a/src/core/cheats.h +++ b/src/core/cheats.h @@ -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);