示例#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;
}