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

Method GetDiscOverrideFromGameSettings

pcsx2/VMManager.cpp:820–840  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

818}
819
820std::string VMManager::GetDiscOverrideFromGameSettings(const std::string& elf_path)
821{
822 std::string iso_path;
823 ElfObject elfo;
824 if (!elfo.OpenFile(elf_path, false, nullptr))
825 return iso_path;
826
827 const u32 crc = elfo.GetCRC();
828 if (crc != 0)
829 {
830 INISettingsInterface si(GetGameSettingsPath(std::string_view(), crc));
831 if (si.Load())
832 {
833 iso_path = si.GetStringValue("EmuCore", "DiscPath");
834 if (!iso_path.empty())
835 Console.WriteLn(fmt::format("Disc override for ELF at '{}' is '{}'", elf_path, iso_path));
836 }
837 }
838
839 return iso_path;
840}
841
842std::string VMManager::GetInputProfilePath(const std::string_view name)
843{

Callers

nothing calls this directly

Calls 7

OpenFileMethod · 0.80
formatFunction · 0.50
GetCRCMethod · 0.45
LoadMethod · 0.45
GetStringValueMethod · 0.45
emptyMethod · 0.45
WriteLnMethod · 0.45

Tested by

no test coverage detected