| 111 | } |
| 112 | |
| 113 | bool 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 | |
| 133 | std::optional<PadData> InputRecordingFile::readPadData(const uint frame, const uint port, const uint slot) |
| 134 | { |
no test coverage detected