UI: Centralize BG pic choosing a bit.

It's in several places.
This commit is contained in:
Unknown W. Brackets committed 2021-04-04 10:57:40 -07:00
1 parent e2a8c83b9f
commit f98bafb73d
4 files changed
+21 -36

No files matched your search

+2 -6
View File
@@ -1309,12 +1309,8 @@ bool MainScreen::DrawBackgroundFor(UIContext &dc, const std::string &gamePath, f
return false;
}
Draw::Texture *texture = nullptr;
if (ginfo->pic1.texture) {
texture = ginfo->pic1.texture->GetTexture();
} else if (ginfo->pic0.texture) {
texture = ginfo->pic0.texture->GetTexture();
}
auto pic = ginfo->GetBGPic();
Draw::Texture *texture = pic ? pic->texture->GetTexture() : nullptr;
uint32_t color = whiteAlpha(ease(progress)) & 0xFFc0c0c0;
if (texture) {