Use std::string for installing PKG files

Also now only refreshes, when it could open the PKG file.
This commit is contained in:
Raul Tambre 2014-08-23 10:50:34 +03:00
parent ae47cdaad8
commit 7a7264db33

View File

@ -233,18 +233,18 @@ void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event))
Emu.Stop(); Emu.Stop();
// Open and install PKG file // Open and install PKG file
wxString filePath = ctrl.GetPath(); std::string filePath = ctrl.GetPath().ToStdString();
rFile pkg_f(filePath.ToStdString(), rFile::read); // TODO: Use VFS to install PKG files rFile pkg_f(filePath, rFile::read); // TODO: Use VFS to install PKG files
if (pkg_f.IsOpened()) if (pkg_f.IsOpened())
{ {
PKGLoader pkg(pkg_f); PKGLoader pkg(pkg_f);
pkg.Install("/dev_hdd0/game/"); pkg.Install("/dev_hdd0/game/");
pkg.Close(); pkg.Close();
}
// Refresh game list // Refresh game list
m_game_viewer->Refresh(); m_game_viewer->Refresh();
}
} }
void MainFrame::BootElf(wxCommandEvent& WXUNUSED(event)) void MainFrame::BootElf(wxCommandEvent& WXUNUSED(event))