Skip to content

Commit

Permalink
Merge pull request #2922 from aserna3/SDBlock
Browse files Browse the repository at this point in the history
Implemented ability to block writes to the SD card
  • Loading branch information
phire committed Aug 30, 2015
2 parents fe1c6cb + db7fe95 commit 368867d
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Source/Core/Core/BootManager.cpp
Expand Up @@ -242,7 +242,7 @@ bool BootCore(const std::string& _rFilename)
{
StartUp.bCPUThread = g_NetPlaySettings.m_CPUthread;
StartUp.bDSPHLE = g_NetPlaySettings.m_DSPHLE;
StartUp.bEnableMemcardSaving = g_NetPlaySettings.m_WriteToMemcard;
StartUp.bEnableMemcardSdWriting = g_NetPlaySettings.m_WriteToMemcard;
StartUp.iCPUCore = g_NetPlaySettings.m_CPUcore;
StartUp.SelectedLanguage = g_NetPlaySettings.m_SelectedLanguage;
StartUp.bOverrideGCLanguage = g_NetPlaySettings.m_OverrideGCLanguage;
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/Core/ConfigManager.cpp
Expand Up @@ -39,7 +39,7 @@ SConfig::SConfig()
bCPUThread(true), bDSPThread(false), bDSPHLE(true),
bSkipIdle(true), bSyncGPUOnSkipIdleHack(true), bNTSC(false), bForceNTSCJ(false),
bHLE_BS2(true), bEnableCheats(false),
bEnableMemcardSaving(true),
bEnableMemcardSdWriting(true),
bDPL2Decoder(false), iLatency(14),
bRunCompareServer(false), bRunCompareClient(false),
bMMU(false), bDCBZOFF(false),
Expand Down Expand Up @@ -605,7 +605,7 @@ void SConfig::LoadDefaults()
iBBDumpPort = -1;
bSyncGPU = false;
bFastDiscSpeed = false;
bEnableMemcardSaving = true;
bEnableMemcardSdWriting = true;
SelectedLanguage = 0;
bOverrideGCLanguage = false;
bWii = false;
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/ConfigManager.h
Expand Up @@ -87,7 +87,7 @@ struct SConfig : NonCopyable
bool bForceNTSCJ;
bool bHLE_BS2;
bool bEnableCheats;
bool bEnableMemcardSaving;
bool bEnableMemcardSdWriting;

bool bDPL2Decoder;
int iLatency;
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/HW/GCMemcardDirectory.cpp
Expand Up @@ -186,7 +186,7 @@ GCMemcardDirectory::GCMemcardDirectory(const std::string& directory, int slot, u

void GCMemcardDirectory::FlushThread()
{
if (!SConfig::GetInstance().bEnableMemcardSaving)
if (!SConfig::GetInstance().bEnableMemcardSdWriting)
{
return;
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/HW/GCMemcardRaw.cpp
Expand Up @@ -63,7 +63,7 @@ MemoryCard::~MemoryCard()

void MemoryCard::FlushThread()
{
if (!SConfig::GetInstance().bEnableMemcardSaving)
if (!SConfig::GetInstance().bEnableMemcardSdWriting)
{
return;
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.cpp
Expand Up @@ -423,7 +423,7 @@ u32 CWII_IPC_HLE_Device_sdio_slot0::ExecuteCommand(u32 _BufferIn, u32 _BufferInS
DEBUG_LOG(WII_IPC_SD, "%sWrite %i Block(s) from 0x%08x bsize %i to offset 0x%08x!",
req.isDMA ? "DMA " : "", req.blocks, req.addr, req.bsize, req.arg);

if (m_Card)
if (m_Card && SConfig::GetInstance().bEnableMemcardSdWriting)
{
u32 size = req.bsize * req.blocks;

Expand Down
2 changes: 1 addition & 1 deletion Source/Core/DolphinWX/NetPlay/NetWindow.cpp
Expand Up @@ -202,7 +202,7 @@ NetPlayDialog::NetPlayDialog(wxWindow* const parent, const CGameListCtrl* const
padbuf_spin->Bind(wxEVT_SPINCTRL, &NetPlayDialog::OnAdjustBuffer, this);
bottom_szr->Add(padbuf_spin, 0, wxCENTER);

m_memcard_write = new wxCheckBox(panel, wxID_ANY, _("Write memcards (GC)"));
m_memcard_write = new wxCheckBox(panel, wxID_ANY, _("Write memcards/SD"));
bottom_szr->Add(m_memcard_write, 0, wxCENTER);
}

Expand Down

0 comments on commit 368867d

Please sign in to comment.