GCMemcard/GCIFile: Implement LoadHeader().
This commit is contained in:
parent
884af05589
commit
5af05f6714
|
@ -10,6 +10,25 @@
|
|||
#include "Common/Logging/Log.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
|
||||
bool GCIFile::LoadHeader()
|
||||
{
|
||||
if (m_filename.empty())
|
||||
return false;
|
||||
|
||||
File::IOFile save_file(m_filename, "rb");
|
||||
if (!save_file)
|
||||
return false;
|
||||
|
||||
INFO_LOG(EXPANSIONINTERFACE, "Reading header from disk for %s", m_filename.c_str());
|
||||
if (!save_file.ReadBytes(&m_gci_header, sizeof(m_gci_header)))
|
||||
{
|
||||
ERROR_LOG(EXPANSIONINTERFACE, "Failed to read header for %s", m_filename.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GCIFile::LoadSaveBlocks()
|
||||
{
|
||||
if (m_save_data.empty())
|
||||
|
|
|
@ -15,6 +15,7 @@ class PointerWrap;
|
|||
class GCIFile
|
||||
{
|
||||
public:
|
||||
bool LoadHeader();
|
||||
bool LoadSaveBlocks();
|
||||
bool HasCopyProtection() const;
|
||||
void DoState(PointerWrap& p);
|
||||
|
|
Loading…
Reference in New Issue