mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
High rescale quality for icons in GameViewer, fixed removing of games in GameViewer
This commit is contained in:
parent
181d593cee
commit
8ec5b1cd84
@ -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