Пример #1
0
void VFS::Init(const wxString& path)
{
	UnMountAll();

	Array<VFSManagerEntry> entries;
	SaveLoadDevices(entries, true);

	for(uint i=0; i<entries.GetCount(); ++i)
	{
		vfsDevice* dev;

		switch(entries[i].device)
		{
		case vfsDevice_LocalFile:
			dev = new vfsDeviceLocalFile();
		break;

		case vfsDevice_HDD:
			dev = new vfsDeviceHDD(entries[i].device_path);
		break;

		default:
			continue;
		}
		
		wxString mpath = entries[i].path;
		mpath.Replace("$(EmulatorDir)", wxGetCwd());
		mpath.Replace("$(GameDir)", vfsDevice::GetRoot(path));
		Mount(entries[i].mount, mpath, dev);
	}
}
Пример #2
0
void VFS::Init(const std::string& path)
{
	UnMountAll();

	std::vector<VFSManagerEntry> entries;
	SaveLoadDevices(entries, true);

	for(const VFSManagerEntry& entry : entries)
	{
		vfsDevice* dev;

		switch(entry.device)
		{
		case vfsDevice_LocalFile:
			dev = new vfsDeviceLocalFile();
		break;

		case vfsDevice_HDD:
			dev = new vfsDeviceHDD(entry.device_path);
		break;

		default:
			continue;
		}
		
		wxString mpath = entry.path;
		mpath.Replace("$(EmulatorDir)", wxGetCwd());
		mpath.Replace("$(GameDir)", fmt::FromUTF8(vfsDevice::GetRoot(path)));
		Mount(entry.mount, fmt::ToUTF8(mpath), dev);
	}
}
Пример #3
0
Файл: VFS.cpp Проект: ss23/rpcs3
void VFS::Init(const std::string& path)
{
	cwd = simplify_path(path, true, false);

	UnMountAll();

	std::vector<VFSManagerEntry> entries;
	SaveLoadDevices(entries, true);

	for(const VFSManagerEntry& entry : entries)
	{
		vfsDevice* dev;

		switch(entry.device)
		{
		case vfsDevice_LocalFile:
			dev = new vfsDeviceLocalFile();
		break;

		case vfsDevice_HDD:
			dev = new vfsDeviceHDD(entry.device_path);
		break;

		default:
			continue;
		}
		
		std::string mpath = entry.path;
		// TODO: This shouldn't use current dir
		// If no value assigned to SysEmulationDirPath in INI, use the path that with executable.
		if (rpcs3::config.system.emulation_dir_path_enable.value())
		{
			fmt::Replace(mpath, "$(EmulatorDir)", rpcs3::config.system.emulation_dir_path.value());
		}
		else
		{
			fmt::Replace(mpath, "$(EmulatorDir)", Emu.GetEmulatorPath());
		}
		fmt::Replace(mpath, "$(GameDir)", cwd);
		Mount(entry.mount, mpath, dev);
	}

	Link("/app_home/", "/host_root/" + cwd);
}