From 5f099b1beab87bd278a640e8f07927d218bf7f41 Mon Sep 17 00:00:00 2001 From: Chromaryu Date: Tue, 2 Apr 2019 06:10:43 +0900 Subject: [PATCH] Pnach: Add Author line. (#2911) Adds a separate author line for pnach entries. This will allow to separate comments with other info such as pnach purposes. GameDB could be updated with the new changes for a more slick and clean look. --- pcsx2/Patch.cpp | 10 ++++++++-- pcsx2/Patch.h | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pcsx2/Patch.cpp b/pcsx2/Patch.cpp index 468cd87720..ce0413a07c 100644 --- a/pcsx2/Patch.cpp +++ b/pcsx2/Patch.cpp @@ -47,8 +47,9 @@ struct PatchTextTable static const PatchTextTable commands_patch[] = { - { 1, L"comment", PatchFunc::comment }, - { 2, L"patch", PatchFunc::patch }, + { 1, L"author", PatchFunc::author}, + { 2, L"comment", PatchFunc::comment }, + { 3, L"patch", PatchFunc::patch }, { 0, wxEmptyString, NULL } // Array Terminator }; @@ -282,6 +283,11 @@ namespace PatchFunc PatchesCon->WriteLn(L"comment: " + text2); } + void author(const wxString& text1, const wxString& text2) + { + PatchesCon->WriteLn(L"Author: " + text2); + } + struct PatchPieces { wxArrayString m_pieces; diff --git a/pcsx2/Patch.h b/pcsx2/Patch.h index e0d6e9b520..c5c7362c49 100644 --- a/pcsx2/Patch.h +++ b/pcsx2/Patch.h @@ -92,6 +92,7 @@ struct IniPatch namespace PatchFunc { + PATCHTABLEFUNC author; PATCHTABLEFUNC comment; PATCHTABLEFUNC gametitle; PATCHTABLEFUNC patch;