mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-09-20 08:18:58 +00:00
wx: UTF8 path fix
This commit is contained in:
parent
cdc49d166e
commit
14e5aa57c8
2 changed files with 15 additions and 9 deletions
|
@ -235,7 +235,7 @@ void GameViewer::RemoveGame(wxCommandEvent& event)
|
|||
|
||||
if (wxMessageBox("Permanently delete game files?", "Confirm Delete", wxYES_NO | wxNO_DEFAULT) == wxYES)
|
||||
{
|
||||
fs::remove_all(Emu.GetGameDir() + this->GetItemText(i, 6).ToStdString());
|
||||
fs::remove_all(Emu.GetGameDir() + fmt::ToUTF8(this->GetItemText(i, 6)));
|
||||
}
|
||||
|
||||
Refresh();
|
||||
|
|
|
@ -226,9 +226,11 @@ void MainFrame::BootGame(wxCommandEvent& WXUNUSED(event))
|
|||
|
||||
Emu.Stop();
|
||||
|
||||
if(!Emu.BootGame(ctrl.GetPath().ToStdString()))
|
||||
const std::string path = fmt::ToUTF8(ctrl.GetPath());
|
||||
|
||||
if (!Emu.BootGame(path))
|
||||
{
|
||||
LOG_ERROR(GENERAL, "PS3 executable not found in selected folder (%s)", fmt::ToUTF8(ctrl.GetPath())); // passing std::string (test)
|
||||
LOG_ERROR(GENERAL, "PS3 executable not found in selected folder (%s)", path);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -243,12 +245,14 @@ void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event))
|
|||
|
||||
Emu.Stop();
|
||||
|
||||
const std::string path = fmt::ToUTF8(ctrl.GetPath());
|
||||
|
||||
// Open PKG file
|
||||
fs::file pkg_f(ctrl.GetPath().ToStdString());
|
||||
fs::file pkg_f(path);
|
||||
|
||||
if (!pkg_f || pkg_f.size() < 64)
|
||||
{
|
||||
LOG_ERROR(LOADER, "PKG: Failed to open %s", ctrl.GetPath().ToStdString());
|
||||
LOG_ERROR(LOADER, "PKG: Failed to open %s", path);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -428,7 +432,9 @@ void MainFrame::InstallFirmware(wxCommandEvent& WXUNUSED(event))
|
|||
|
||||
Emu.Stop();
|
||||
|
||||
fs::file pup_f(ctrl.GetPath().ToStdString());
|
||||
const std::string path = fmt::ToUTF8(ctrl.GetPath());
|
||||
|
||||
fs::file pup_f(path);
|
||||
pup_object pup(pup_f);
|
||||
if (!pup)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue