예제 #1
0
파일: TROPUSR.cpp 프로젝트: Apicio/rpcs3
bool TROPUSRLoader::Load(const std::string& filepath, const std::string& configpath)
{
	if (m_file)
		Close();

	// TODO: This seems to be always true... A bug in ExistsFile() ?
	if (!Emu.GetVFS().ExistsFile(filepath))
		Generate(filepath, configpath);

	m_file = Emu.GetVFS().OpenFile(filepath, vfsRead);
	LoadHeader();
	LoadTableHeaders();
	LoadTables();

	Close();
	return true;
}
예제 #2
0
파일: TROPUSR.cpp 프로젝트: KitoHo/rpcs3
bool TROPUSRLoader::Load(const std::string& filepath, const std::string& configpath)
{
	const std::string& path = vfs::get(filepath);

	if (!fs::is_file(path))
	{
		Generate(filepath, configpath);
	}

	if (!m_file.open(path, fs::read))
	{
		return false;
	}

	if (!LoadHeader() || !LoadTableHeaders() || !LoadTables())
	{
		return false;
	}

	m_file.release();
	return true;
}