GUI: Fix removing game from game list

Fixes #1326
This commit is contained in:
Danila Malyutin 2015-12-05 18:13:16 +03:00
parent 38709058a3
commit d01235ce2d
1 changed files with 4 additions and 1 deletions

View File

@ -269,8 +269,11 @@ void GameViewer::ConfigureGame(wxCommandEvent& WXUNUSED(event))
void GameViewer::RemoveGame(wxCommandEvent& event)
{
long i = GetFirstSelected();
if (i < 0) return;
Emu.GetVFS().Init("/");
Emu.GetVFS().DeleteAll(m_path + "/" + this->GetItemText(event.GetId(), 6).ToStdString());
Emu.GetVFS().DeleteAll(m_path + "/" + this->GetItemText(i, 6).ToStdString());
Emu.GetVFS().UnMountAll();
Refresh();