mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 23:55:38 +00:00
Added some error checking when downloading thumbnails in the scraper GUI.
This commit is contained in:
parent
cbb62775ac
commit
c5098a62d5
|
@ -554,7 +554,7 @@ void GuiScraperSearch::updateInfoPane()
|
|||
|
||||
// Cache the thumbnail image in mScraperResults so that we don't need to download
|
||||
// it every time the list is scrolled back and forth.
|
||||
if (mScraperResults[i].thumbnailImageData.size() > 0) {
|
||||
if (mScraperResults[i].thumbnailImageData.size() > 350) {
|
||||
std::string content {mScraperResults[i].thumbnailImageData};
|
||||
mResultThumbnail->setImage(content.data(), content.length());
|
||||
mGrid.onSizeChanged(); // A hack to fix the thumbnail position since its size changed.
|
||||
|
@ -837,7 +837,7 @@ void GuiScraperSearch::updateThumbnail()
|
|||
}
|
||||
// Activate the thumbnail in the GUI.
|
||||
std::string content {mScraperResults[mResultList->getCursorId()].thumbnailImageData};
|
||||
if (content.size() > 0) {
|
||||
if (content.size() > 350) {
|
||||
mResultThumbnail->setImage(content.data(), content.length());
|
||||
mGrid.onSizeChanged(); // A hack to fix the thumbnail position since its size changed.
|
||||
}
|
||||
|
|
|
@ -150,7 +150,7 @@ void GuiScraperSingle::onSizeChanged()
|
|||
mGrid.setColWidthPerc(1, 0.04f);
|
||||
|
||||
mGrid.setSize(glm::round(mSize));
|
||||
mBackground.fitTo(mSize, glm::vec3 {}, glm::vec2 {-32.0f, -32.0f});
|
||||
mBackground.fitTo(mSize, glm::vec3 {0.0f, 0.0f, 0.0f}, glm::vec2 {-32.0f, -32.0f});
|
||||
|
||||
// Add some extra margins to the game name.
|
||||
const float newSizeX {mSize.x * 0.96f};
|
||||
|
|
Loading…
Reference in a new issue