mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-24 19:52:37 +01:00
Fix slashes for Linux
This commit is contained in:
parent
a00f47b5e4
commit
6968137bbc
@ -226,7 +226,6 @@ vfsDevice* VFS::GetDevice(const wxString& ps3_path, wxString& path) const
|
||||
}
|
||||
|
||||
if(max_i < 0) return nullptr;
|
||||
|
||||
path = vfsDevice::GetWinPath(m_devices[max_i].GetLocalPath(), ps3_path(max_eq, ps3_path.Len() - max_eq));
|
||||
return &m_devices[max_i];
|
||||
}
|
||||
@ -303,27 +302,27 @@ void VFS::SaveLoadDevices(Array<VFSManagerEntry>& res, bool is_load)
|
||||
{
|
||||
int idx;
|
||||
idx = res.Move(new VFSManagerEntry());
|
||||
res[idx].path = "$(EmulatorDir)\\dev_hdd0\\";
|
||||
res[idx].path = "$(EmulatorDir)/dev_hdd0/";
|
||||
res[idx].mount = "/dev_hdd0/";
|
||||
res[idx].device = vfsDevice_LocalFile;
|
||||
|
||||
idx = res.Move(new VFSManagerEntry());
|
||||
res[idx].path = "$(EmulatorDir)\\dev_hdd1\\";
|
||||
res[idx].path = "$(EmulatorDir)/dev_hdd1/";
|
||||
res[idx].mount = "/dev_hdd1/";
|
||||
res[idx].device = vfsDevice_LocalFile;
|
||||
|
||||
idx = res.Move(new VFSManagerEntry());
|
||||
res[idx].path = "$(EmulatorDir)\\dev_flash\\";
|
||||
res[idx].path = "$(EmulatorDir)/dev_flash/";
|
||||
res[idx].mount = "/dev_flash/";
|
||||
res[idx].device = vfsDevice_LocalFile;
|
||||
|
||||
idx = res.Move(new VFSManagerEntry());
|
||||
res[idx].path = "$(EmulatorDir)\\dev_usb000\\";
|
||||
res[idx].path = "$(EmulatorDir)/dev_usb000/";
|
||||
res[idx].mount = "/dev_usb000/";
|
||||
res[idx].device = vfsDevice_LocalFile;
|
||||
|
||||
idx = res.Move(new VFSManagerEntry());
|
||||
res[idx].path = "$(EmulatorDir)\\dev_usb000\\";
|
||||
res[idx].path = "$(EmulatorDir)/dev_usb000/";
|
||||
res[idx].mount = "/dev_usb/";
|
||||
res[idx].device = vfsDevice_LocalFile;
|
||||
|
||||
@ -333,7 +332,7 @@ void VFS::SaveLoadDevices(Array<VFSManagerEntry>& res, bool is_load)
|
||||
res[idx].device = vfsDevice_LocalFile;
|
||||
|
||||
idx = res.Move(new VFSManagerEntry());
|
||||
res[idx].path = "$(GameDir)\\..\\";
|
||||
res[idx].path = "$(GameDir)/../";
|
||||
res[idx].mount = "/dev_bdvd/";
|
||||
res[idx].device = vfsDevice_LocalFile;
|
||||
|
||||
|
@ -48,8 +48,8 @@ u32 vfsDevice::CmpLocalPath(const wxString& local_path)
|
||||
wxFileName path0(m_local_path);
|
||||
path0.Normalize();
|
||||
|
||||
wxArrayString arr0 = wxSplit(path0.GetFullPath(), '\\');
|
||||
wxArrayString arr1 = wxSplit(local_path, '\\');
|
||||
wxArrayString arr0 = wxSplit(path0.GetFullPath(), '/');
|
||||
wxArrayString arr1 = wxSplit(local_path, '/');
|
||||
|
||||
const u32 lim = min(arr0.GetCount(), arr1.GetCount());
|
||||
u32 ret = 0;
|
||||
@ -168,7 +168,7 @@ wxString vfsDevice::GetWinPath(const wxString& p, bool is_dir)
|
||||
{
|
||||
if(!is_ls)
|
||||
{
|
||||
ret += '\\';
|
||||
ret += '/';
|
||||
is_ls = true;
|
||||
}
|
||||
|
||||
@ -179,7 +179,7 @@ wxString vfsDevice::GetWinPath(const wxString& p, bool is_dir)
|
||||
ret += p[i];
|
||||
}
|
||||
|
||||
if(is_dir && ret[ret.Len() - 1] != '\\') ret += '\\';
|
||||
if(is_dir && ret[ret.Len() - 1] != '/') ret += '/';
|
||||
|
||||
wxFileName res(ret);
|
||||
res.Normalize();
|
||||
@ -191,7 +191,7 @@ wxString vfsDevice::GetWinPath(const wxString& l, const wxString& r)
|
||||
if(l.IsEmpty()) return GetWinPath(r, false);
|
||||
if(r.IsEmpty()) return GetWinPath(l);
|
||||
|
||||
return GetWinPath(l + '\\' + r, false);
|
||||
return GetWinPath(l + '/' + r, false);
|
||||
}
|
||||
|
||||
wxString vfsDevice::GetPs3Path(const wxString& p, bool is_dir)
|
||||
|
@ -56,7 +56,7 @@ bool vfsLocalFile::Create(const wxString& path)
|
||||
for(uint p=1; p < path.Len() && path[p] != '\0' ; p++)
|
||||
{
|
||||
for(; p < path.Len() && path[p] != '\0'; p++)
|
||||
if(path[p] == '\\') break;
|
||||
if(path[p] == '/') break;
|
||||
|
||||
if(p == path.Len() || path[p] == '\0')
|
||||
break;
|
||||
@ -70,7 +70,7 @@ bool vfsLocalFile::Create(const wxString& path)
|
||||
}
|
||||
|
||||
//create file
|
||||
if(path(path.Len() - 1, 1) != '\\' && !wxFileExists(path))
|
||||
if(path(path.Len() - 1, 1) != '/' && !wxFileExists(path))
|
||||
{
|
||||
wxFile f;
|
||||
return f.Create(path);
|
||||
|
@ -302,7 +302,7 @@ public:
|
||||
void Save(RSXTexture& tex)
|
||||
{
|
||||
static const wxString& dir_path = "textures";
|
||||
static const wxString& file_fmt = dir_path + "\\" + "tex[%d].png";
|
||||
static const wxString& file_fmt = dir_path + "/" + "tex[%d].png";
|
||||
|
||||
if(!wxDirExists(dir_path)) wxMkdir(dir_path);
|
||||
|
||||
|
@ -695,7 +695,7 @@ public:
|
||||
|
||||
do
|
||||
{
|
||||
if(s[pos] == '\\' || s[pos] == '\0')
|
||||
if(s[pos] == '/' || s[pos] == '\0')
|
||||
{
|
||||
if(file_pos != -1)
|
||||
{
|
||||
|
@ -141,7 +141,7 @@ void Emulator::Load()
|
||||
m_path = elf_path;
|
||||
}
|
||||
|
||||
ConLog.Write("Loading '%s'...", m_path.wx_str());
|
||||
ConLog.Write("Loading '%s'...", m_path.ToStdString().c_str());
|
||||
GetInfo().Reset();
|
||||
m_vfs.Init(m_path);
|
||||
|
||||
@ -149,7 +149,7 @@ void Emulator::Load()
|
||||
ConLog.Write("Mount info:");
|
||||
for(uint i=0; i<m_vfs.m_devices.GetCount(); ++i)
|
||||
{
|
||||
ConLog.Write("%s -> %s", m_vfs.m_devices[i].GetPs3Path().wx_str(), m_vfs.m_devices[i].GetLocalPath().wx_str());
|
||||
ConLog.Write("%s -> %s", m_vfs.m_devices[i].GetPs3Path().ToStdString().c_str(), m_vfs.m_devices[i].GetLocalPath().ToStdString().c_str());
|
||||
}
|
||||
ConLog.SkipLn();
|
||||
|
||||
@ -162,7 +162,7 @@ void Emulator::Load()
|
||||
|
||||
if(!f.IsOpened())
|
||||
{
|
||||
ConLog.Error("Elf not found! (%s - %s)", m_path.wx_str(), m_elf_path.wx_str());
|
||||
ConLog.Error("Elf not found! (%s - %s)", m_path.ToStdString().c_str(), m_elf_path.ToStdString().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -441,7 +441,7 @@ void Emulator::LoadPoints(const std::string& path)
|
||||
if(version != bpdb_version ||
|
||||
(sizeof(u16) + break_count * sizeof(u64) + sizeof(u32) + marked_count * sizeof(u64) + sizeof(u32)) != length)
|
||||
{
|
||||
ConLog.Error("'%s' is broken", wxString(path).wx_str());
|
||||
ConLog.Error("'%s' is broken", path.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -202,7 +202,7 @@ void MainFrame::BootGame(wxCommandEvent& WXUNUSED(event))
|
||||
}
|
||||
else
|
||||
{
|
||||
ConLog.Error("Ps3 executable not found in selected folder (%s)", ctrl.GetPath().wx_str());
|
||||
ConLog.Error("Ps3 executable not found in selected folder (%s)", ctrl.GetPath().ToStdString().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user