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

Function GetOpticalDriveList

pcsx2/CDVD/Darwin/DriveUtility.cpp:56–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54#endif
55
56std::vector<std::string> GetOpticalDriveList()
57{
58#ifdef __APPLE__
59 std::vector<std::string> drives;
60
61 if (CFMutableDictionaryRef cd_classes = IOServiceMatching(kIOCDMediaClass))
62 {
63 std::vector<std::string> cd = GetDriveListFromClasses(cd_classes);
64 drives.insert(drives.end(), cd.begin(), cd.end());
65 }
66
67 if (CFMutableDictionaryRef dvd_classes = IOServiceMatching(kIODVDMediaClass))
68 {
69 std::vector<std::string> dvd = GetDriveListFromClasses(dvd_classes);
70 drives.insert(drives.end(), dvd.begin(), dvd.end());
71 }
72 return drives;
73#else
74 return {};
75#endif
76}
77
78void GetValidDrive(std::string& drive)
79{

Callers 1

GetValidDriveFunction · 0.70

Calls 4

GetDriveListFromClassesFunction · 0.85
insertMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected