mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-11 05:26:24 +02:00
Don't use PIC0 as background if PIC1 is missing (actually this time). Remove dark background.
This commit is contained in:
1 parent
d93178bd13
commit
eb5c98cd07
5 files changed
+5
-10
No files matched your search
+1
-3
@@ -121,11 +121,9 @@ public:
|
||||
pendingFlags &= ~flags;
|
||||
}
|
||||
|
||||
GameInfoTex *GetBGPic() {
|
||||
GameInfoTex *GetPIC1() {
|
||||
if (pic1.texture)
|
||||
return &pic1;
|
||||
if (pic0.texture)
|
||||
return &pic0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -528,9 +528,6 @@ ScreenRenderFlags GameScreen::render(ScreenRenderMode mode) {
|
||||
}
|
||||
|
||||
if (draw) {
|
||||
// draw a dark rectangle behind the image.
|
||||
dc.FillRect(UI::Drawable(0x80000000), bounds);
|
||||
|
||||
dc.Flush();
|
||||
|
||||
dc.GetDrawContext()->BindTexture(0, info->pic0.texture);
|
||||
|
||||
+1
-1
@@ -1461,7 +1461,7 @@ bool MainScreen::DrawBackgroundFor(UIContext &dc, const Path &gamePath, float pr
|
||||
return false;
|
||||
}
|
||||
|
||||
auto pic = ginfo->GetBGPic();
|
||||
auto pic = ginfo->GetPIC1();
|
||||
Draw::Texture *texture = pic ? pic->texture : nullptr;
|
||||
|
||||
uint32_t color = whiteAlpha(ease(progress)) & 0xFFc0c0c0;
|
||||
|
||||
+2
-2
@@ -273,7 +273,7 @@ private:
|
||||
static void DrawTex(UIContext &dc, std::shared_ptr<GameInfo> &ginfo, float amount) {
|
||||
if (!ginfo || amount <= 0.0f)
|
||||
return;
|
||||
GameInfoTex *pic = ginfo->GetBGPic();
|
||||
GameInfoTex *pic = ginfo->GetPIC1();
|
||||
if (!pic)
|
||||
return;
|
||||
|
||||
@@ -491,7 +491,7 @@ void DrawGameBackground(UIContext &dc, const Path &gamePath, float x, float y, f
|
||||
ginfo = g_gameInfoCache->GetInfo(dc.GetDrawContext(), gamePath, GameInfoFlags::PIC1);
|
||||
}
|
||||
|
||||
GameInfoTex *pic = (ginfo && ginfo->Ready(GameInfoFlags::PIC1)) ? ginfo->GetBGPic() : nullptr;
|
||||
GameInfoTex *pic = (ginfo && ginfo->Ready(GameInfoFlags::PIC1)) ? ginfo->GetPIC1() : nullptr;
|
||||
if (pic) {
|
||||
dc.GetDrawContext()->BindTexture(0, pic->texture);
|
||||
uint32_t color = whiteAlpha(ease((time_now_d() - pic->timeLoaded) * 3)) & 0xFFc0c0c0;
|
||||
|
||||
@@ -748,7 +748,7 @@ void GameIconView::Draw(UIContext &dc) {
|
||||
|
||||
// Fade icon with the backgrounds.
|
||||
double loadTime = info->icon.timeLoaded;
|
||||
auto pic = info->GetBGPic();
|
||||
auto pic = info->GetPIC1();
|
||||
if (pic) {
|
||||
loadTime = std::max(loadTime, pic->timeLoaded);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user