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

Method openExisting

pcsx2/Recording/InputRecordingFile.cpp:113–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113bool InputRecordingFile::openExisting(const std::string& path)
114{
115 if ((m_recordingFile = FileSystem::OpenCFile(path.data(), "rb+")) == nullptr)
116 {
117 InputRec::consoleLog(fmt::format("Input recording file opening failed. Error - {}", strerror(errno)));
118 return false;
119 }
120
121 if (!verifyRecordingFileHeader())
122 {
123 close();
124 InputRec::consoleLog("Input recording file header is invalid");
125 return false;
126 }
127
128 m_filename = path;
129 InputRecording::InformGSThread();
130 return true;
131}
132
133std::optional<PadData> InputRecordingFile::readPadData(const uint frame, const uint port, const uint slot)
134{

Callers 2

openFileMethod · 0.80
playMethod · 0.80

Calls 3

consoleLogFunction · 0.85
formatFunction · 0.50
dataMethod · 0.45

Tested by

no test coverage detected