mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 16:49:58 -06:00
Allow disabling memory card writes in netplay.
Fixes issue 6217.
This commit is contained in:

committed by
Rachel Bryk

parent
5f32febcf3
commit
c7abf7e8d2
@ -22,6 +22,7 @@
|
||||
#include "NetPlay.h"
|
||||
#include "NetWindow.h"
|
||||
#include "Frame.h"
|
||||
#include "Core.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
@ -333,8 +334,11 @@ NetPlayDiag::NetPlayDiag(wxWindow* const parent, const CGameListCtrl* const game
|
||||
padbuf_btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &NetPlayDiag::OnPadBuffHelp, this);
|
||||
bottom_szr->Add(padbuf_spin, 0, wxCENTER);
|
||||
bottom_szr->Add(padbuf_btn);
|
||||
m_memcard_write = new wxCheckBox(panel, wxID_ANY, _("Write memcards (GC)"));
|
||||
m_memcard_write->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &NetPlayDiag::OnMemcardWriteCheck, this);
|
||||
bottom_szr->Add(m_memcard_write, 0, wxCENTER);
|
||||
}
|
||||
|
||||
|
||||
bottom_szr->AddStretchSpacer(1);
|
||||
bottom_szr->Add(quit_btn);
|
||||
|
||||
@ -397,6 +401,8 @@ void NetPlayDiag::OnStop(wxCommandEvent&)
|
||||
void NetPlayDiag::BootGame(const std::string& filename)
|
||||
{
|
||||
main_frame->BootGame(filename);
|
||||
|
||||
Core::g_CoreStartupParameter.bEnableMemcardSaving = m_memcard_write->GetValue();
|
||||
}
|
||||
|
||||
void NetPlayDiag::StopGame()
|
||||
@ -449,6 +455,11 @@ void NetPlayDiag::OnPadBuffHelp(wxCommandEvent&)
|
||||
m_chat_text->AppendText(StrToWxStr(ss.str()));
|
||||
}
|
||||
|
||||
void NetPlayDiag::OnMemcardWriteCheck(wxCommandEvent &event)
|
||||
{
|
||||
netplay_ptr->SetMemcardWriteEnabled(m_memcard_write->GetValue());
|
||||
}
|
||||
|
||||
void NetPlayDiag::OnAdjustBuffer(wxCommandEvent& event)
|
||||
{
|
||||
const int val = ((wxSpinCtrl*)event.GetEventObject())->GetValue();
|
||||
|
Reference in New Issue
Block a user