Minor changes

This commit is contained in:
O1L 2014-02-06 22:34:05 +04:00
parent e0737204fd
commit 74426fd4e9
2 changed files with 34 additions and 34 deletions

View file

@ -233,8 +233,31 @@ void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event))
if (!wxRemoveFile(ctrl.GetPath()+".dec"))
ConLog.Warning("Could not delete the decoded DEC file");
pkg_header *header;
pkg_info((const char *)fileName.mb_str(), &header);
wxString titleID_full (header->title_id);
wxString titleID = titleID_full.SubString(7, 15);
wxString mainDir = wxGetCwd();
wxString gamePath = "\\dev_hdd0\\game\\";
wxString pkgDir = wxT(mainDir + gamePath + titleID);
// Save the title ID.
Emu.SetTitleID(titleID);
//Refresh game list
m_game_viewer->Refresh();
if(Emu.BootGame(pkgDir.c_str()))
{
ConLog.Success("Game: boot done.");
}
else
{
ConLog.Error("Ps3 executable not found in folder (%s)", pkgDir.c_str());
}
}
void MainFrame::BootElf(wxCommandEvent& WXUNUSED(event))