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

Method Open

pcsx2/CDVD/InputIsoFile.cpp:192–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190}
191
192bool InputIsoFile::Open(std::string srcfile, Error* error)
193{
194 Close();
195 m_filename = std::move(srcfile);
196 m_reader = GetFileReader(m_filename);
197 if (!m_reader->Open(m_filename, error))
198 {
199 m_reader.reset();
200 return false;
201 }
202
203 if (!Detect())
204 {
205 Error::SetStringFmt(error, "Unable to identify the ISO image type for '{}'", Path::GetFileName(m_filename));
206 Close();
207 return false;
208 }
209
210 m_blocks = m_reader->GetBlockCount();
211
212 Console.WriteLn(Color_StrongBlue, "isoFile open ok: %s", m_filename.c_str());
213
214 Console.WriteLn(" Image type = %s", nameFromType(m_type));
215 //Console.WriteLn(" Fileparts = %u", m_numparts); // Pointless print, it's 1 unless it says otherwise above
216 DevCon.WriteLn(" blocks = %u", m_blocks);
217 DevCon.WriteLn(" offset = %d", m_offset);
218 DevCon.WriteLn(" blocksize = %u", m_blocksize);
219 DevCon.WriteLn(" blockoffset = %d", m_blockofs);
220
221 return true;
222}
223
224bool InputIsoFile::Precache(ProgressCallback* progress, Error* error)
225{

Callers

nothing calls this directly

Calls 7

GetFileReaderFunction · 0.85
nameFromTypeFunction · 0.85
CloseFunction · 0.50
resetMethod · 0.45
GetBlockCountMethod · 0.45
WriteLnMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected