mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-05 01:42:41 +00:00
Fix Cheat Manager not saving created codes
This commit is contained in:
parent
3f56480903
commit
17edcc4fc7
7 changed files with 13 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue