mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 14:01:25 +12:00
Handle error when loading game icon (#1687)
This commit is contained in:
parent
e377199e41
commit
2064f1cb80
1 changed files with 10 additions and 3 deletions
|
@ -335,11 +335,17 @@ void ColumnsArr::Update(const std::vector<GameInfo>& game_data)
|
||||||
{
|
{
|
||||||
wxLogNull logNo; // temporary disable wx warnings ("iCCP: known incorrect sRGB profile" spamming)
|
wxLogNull logNo; // temporary disable wx warnings ("iCCP: known incorrect sRGB profile" spamming)
|
||||||
if (game_icon.LoadFile(fmt::FromUTF8(path), wxBITMAP_TYPE_PNG))
|
if (game_icon.LoadFile(fmt::FromUTF8(path), wxBITMAP_TYPE_PNG))
|
||||||
|
{
|
||||||
game_icon.Rescale(80, 44, wxIMAGE_QUALITY_HIGH);
|
game_icon.Rescale(80, 44, wxIMAGE_QUALITY_HIGH);
|
||||||
}
|
|
||||||
|
|
||||||
m_icon_indexes.push_back(m_img_list->Add(game_icon));
|
m_icon_indexes.push_back(m_img_list->Add(game_icon));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOG_ERROR(GENERAL, "Error loading image %s", path);
|
||||||
|
m_icon_indexes.push_back(-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColumnsArr::Show(wxListView* list)
|
void ColumnsArr::Show(wxListView* list)
|
||||||
|
@ -376,6 +382,7 @@ void ColumnsArr::ShowData(wxListView* list)
|
||||||
list->SetItemData(i, i);
|
list->SetItemData(i, i);
|
||||||
}
|
}
|
||||||
list->SetItem(i, c, fmt::FromUTF8(col->data[i]));
|
list->SetItem(i, c, fmt::FromUTF8(col->data[i]));
|
||||||
|
if (m_icon_indexes[i] >= 0)
|
||||||
list->SetItemColumnImage(i, 0, m_icon_indexes[i]);
|
list->SetItemColumnImage(i, 0, m_icon_indexes[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue