summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/PatchAddEdit.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2015-03-06 12:26:40 +0100
committerJosJuice <josjuice@gmail.com>2015-03-06 12:26:40 +0100
commit4a41ab17155e4103ea7844b6e6aa3c434dbb7e63 (patch)
treeff651f87c20f4e98947c8514a9d7b3cfe04f8df4 /Source/Core/DolphinWX/PatchAddEdit.cpp
parente96569ff0cb7fa10d2c727dc3141710243a9c94e (diff)
Fix 4.0-5689 regression (AR codes, patches)
CreateCodeTab, ARCodeAddEdit and PatchAddEdit need to be able to modify arCodes/onFrame.
Diffstat (limited to 'Source/Core/DolphinWX/PatchAddEdit.cpp')
-rw-r--r--Source/Core/DolphinWX/PatchAddEdit.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/Core/DolphinWX/PatchAddEdit.cpp b/Source/Core/DolphinWX/PatchAddEdit.cpp
index 5d388977bb..bce75ad391 100644
--- a/Source/Core/DolphinWX/PatchAddEdit.cpp
+++ b/Source/Core/DolphinWX/PatchAddEdit.cpp
@@ -28,12 +28,12 @@
#include "DolphinWX/PatchAddEdit.h"
#include "DolphinWX/WxUtils.h"
-CPatchAddEdit::CPatchAddEdit(int _selection, const std::vector<PatchEngine::Patch>& _onFrame, wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& position, const wxSize& size, long style)
+CPatchAddEdit::CPatchAddEdit(int _selection, std::vector<PatchEngine::Patch>* _onFrame, wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& position, const wxSize& size, long style)
: wxDialog(parent, id, title, position, size, style)
+ , onFrame(_onFrame)
+ , selection(_selection)
{
- selection = _selection;
CreateGUIControls(selection);
- onFrame = _onFrame;
Bind(wxEVT_BUTTON, &CPatchAddEdit::SavePatchData, this, wxID_OK);
}
@@ -53,8 +53,8 @@ void CPatchAddEdit::CreateGUIControls(int _selection)
}
else
{
- currentName = StrToWxStr(onFrame.at(_selection).name);
- tempEntries = onFrame.at(_selection).entries;
+ currentName = StrToWxStr(onFrame->at(_selection).name);
+ tempEntries = onFrame->at(_selection).entries;
}
itCurEntry = tempEntries.begin();
@@ -142,12 +142,12 @@ void CPatchAddEdit::SavePatchData(wxCommandEvent& event)
newPatch.entries = tempEntries;
newPatch.active = true;
- onFrame.push_back(newPatch);
+ onFrame->push_back(newPatch);
}
else
{
- onFrame.at(selection).name = WxStrToStr(EditPatchName->GetValue());
- onFrame.at(selection).entries = tempEntries;
+ onFrame->at(selection).name = WxStrToStr(EditPatchName->GetValue());
+ onFrame->at(selection).entries = tempEntries;
}
AcceptAndClose();