summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Cheats/CreateCodeDialog.cpp
diff options
context:
space:
mode:
authorMarkus Wick <degasus@users.noreply.github.com>2015-12-02 14:08:32 +0100
committerMarkus Wick <degasus@users.noreply.github.com>2015-12-02 14:08:32 +0100
commitb0dbb6ef46b431263320cb368c35c89a775c39e1 (patch)
treeb7e1160149b8bd4178cbfdb797fee4fee6b40b0e /Source/Core/DolphinWX/Cheats/CreateCodeDialog.cpp
parent4a40e7b40534bba3da4939c0060ee4f35cc59125 (diff)
parent17edcc4fc7c6c48473fdb7d70ec17d8b54b58f83 (diff)
Merge pull request #3067 from JosJuice/cheat-manager-regression
Fix Cheat Manager not saving created codes
Diffstat (limited to 'Source/Core/DolphinWX/Cheats/CreateCodeDialog.cpp')
-rw-r--r--Source/Core/DolphinWX/Cheats/CreateCodeDialog.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/Core/DolphinWX/Cheats/CreateCodeDialog.cpp b/Source/Core/DolphinWX/Cheats/CreateCodeDialog.cpp
index 60c600702b..364dfbad41 100644
--- a/Source/Core/DolphinWX/Cheats/CreateCodeDialog.cpp
+++ b/Source/Core/DolphinWX/Cheats/CreateCodeDialog.cpp
@@ -17,10 +17,9 @@
// Fired when an ActionReplay code is created.
wxDEFINE_EVENT(UPDATE_CHEAT_LIST_EVENT, wxCommandEvent);
-CreateCodeDialog::CreateCodeDialog(wxWindow* const parent, const u32 address, std::vector<ActionReplay::ARCode>* _arCodes)
+CreateCodeDialog::CreateCodeDialog(wxWindow* const parent, const u32 address)
: wxDialog(parent, wxID_ANY, _("Create AR Code"))
, m_code_address(address)
- , arCodes(_arCodes)
{
wxStaticText* const label_name = new wxStaticText(this, wxID_ANY, _("Name: "));
m_textctrl_name = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(256, -1));
@@ -89,7 +88,7 @@ void CreateCodeDialog::PressOK(wxCommandEvent& ev)
{
CISOProperties isoprops(GameListItem(SConfig::GetInstance().m_LastFilename, std::unordered_map<std::string, std::string>()), this);
// add the code to the isoproperties arcode list
- arCodes->push_back(new_cheat);
+ isoprops.AddARCode(new_cheat);
// save the gameini
isoprops.SaveGameConfig();
isoprops.ActionReplayList_Load(); // loads the new arcodes