mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-23 03:02:53 +01:00
Merge pull request #900 from O1L/master
High rescale quality for icons, fixed removing of games in GameViewer
This commit is contained in:
commit
9ca6bb9296
@ -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();
|
||||
}
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user