mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-26 04:32:35 +01:00
Handle error when loading game icon (#1687)
This commit is contained in:
parent
e377199e41
commit
2064f1cb80
@ -335,10 +335,16 @@ 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));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOG_ERROR(GENERAL, "Error loading image %s", path);
|
||||||
|
m_icon_indexes.push_back(-1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_icon_indexes.push_back(m_img_list->Add(game_icon));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -376,7 +382,8 @@ 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]));
|
||||||
list->SetItemColumnImage(i, 0, m_icon_indexes[i]);
|
if (m_icon_indexes[i] >= 0)
|
||||||
|
list->SetItemColumnImage(i, 0, m_icon_indexes[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user