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

Function FileMcd_SetType

pcsx2/SIO/Memcard/MemoryCardFile.cpp:584–604  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

582}
583
584void FileMcd_SetType()
585{
586 // detect inserted memory card types
587 for (uint slot = 0; slot < 8; ++slot)
588 {
589 if (EmuConfig.Mcd[slot].Filename.empty())
590 {
591 EmuConfig.Mcd[slot].Type = MemoryCardType::Empty;
592 }
593 else if (EmuConfig.Mcd[slot].Enabled)
594 {
595 MemoryCardType type = MemoryCardType::File; // default to file if we can't find anything at the path so it gets auto-generated
596
597 const std::string path(EmuConfig.FullpathToMcd(slot));
598 if (FileSystem::DirectoryExists(path.c_str()))
599 type = MemoryCardType::Folder;
600
601 EmuConfig.Mcd[slot].Type = type;
602 }
603 }
604}
605
606void FileMcd_EmuOpen()
607{

Callers 2

FileMcd_ReopenFunction · 0.85
FileMcd_SwapFunction · 0.85

Calls 3

FullpathToMcdMethod · 0.80
emptyMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected