diff --git a/rpcs3/Gui/GameViewer.cpp b/rpcs3/Gui/GameViewer.cpp index 28b3a039b3..6a2d9a8fe0 100644 --- a/rpcs3/Gui/GameViewer.cpp +++ b/rpcs3/Gui/GameViewer.cpp @@ -245,26 +245,20 @@ void GameViewer::RightClick(wxListEvent& event) void GameViewer::RemoveGame(wxCommandEvent& event) { - wxString GameName = this->GetItemText(event.GetId(), 5); + Emu.GetVFS().Init("/"); - // TODO: VFS is only available at emulation time, this is a temporary solution to locate the game - Emu.GetVFS().Init(m_path); - - vfsDir dir(m_path); - if (!dir.IsOpened()) - return; - const std::string sPath = dir.GetPath().erase(0, 1); - const std::string sGameFolder = GameName.mb_str().data(); - const std::string localPath = sPath + sGameFolder; + // get local path from VFS + std::string local_path; + Emu.GetVFS().GetDevice(m_path, local_path); + std::string del_path = local_path + "/" + this->GetItemText(event.GetId(), 6).ToStdString(); Emu.GetVFS().UnMountAll(); - if (!rExists(localPath)) - return; //TODO: Replace wxWidgetsSpecific filesystem stuff? WxDirDeleteTraverser deleter; - wxDir localDir(localPath); + wxDir localDir(del_path); localDir.Traverse(deleter); + wxRmdir(del_path); // delete empty directory Refresh(); } diff --git a/rpcs3/Gui/GameViewer.h b/rpcs3/Gui/GameViewer.h index c639e71bd7..21c90077b3 100644 --- a/rpcs3/Gui/GameViewer.h +++ b/rpcs3/Gui/GameViewer.h @@ -134,7 +134,7 @@ public: { wxLogNull logNo; // temporary disable wx warnings ("iCCP: known incorrect sRGB profile" spamming) if (game_icon.LoadFile(fmt::FromUTF8(path), wxBITMAP_TYPE_PNG)) - game_icon.Rescale(58, 32); + game_icon.Rescale(58, 32, wxIMAGE_QUALITY_HIGH); } m_icon_indexes.push_back(m_img_list->Add(game_icon));