MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / Read

Method Read

pcsx2/SIO/Memcard/MemoryCardFile.cpp:426–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

424}
425
426s32 FileMemoryCard::Read(uint slot, u8* dest, u32 adr, int size)
427{
428 std::FILE* mcfp = m_file[slot];
429 if (!mcfp)
430 {
431 DevCon.Error("(FileMcd) Ignoring attempted read from disabled slot.");
432 memset(dest, 0, size);
433 return 1;
434 }
435 if (!Seek(mcfp, adr))
436 return 0;
437 return std::fread(dest, size, 1, mcfp) == 1;
438}
439
440s32 FileMemoryCard::Save(uint slot, const u8* src, u32 adr, int size)
441{

Callers 3

FileMcd_ReadFunction · 0.45
ReadDataMethod · 0.45
PS1ReadMethod · 0.45

Calls 1

ErrorMethod · 0.45

Tested by

no test coverage detected