From d93178bd137afe9316f45a2fa92c55fe1af5d82e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 2 Aug 2025 11:23:52 +0200 Subject: [PATCH] Stop using PIC0 as a PIC1 replacement. Fix assorted PIC0 issues. --- UI/GameScreen.cpp | 6 ++---- UI/MainScreen.cpp | 2 +- UI/MiscScreens.cpp | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/UI/GameScreen.cpp b/UI/GameScreen.cpp index ff1400705e..a40abdfe99 100644 --- a/UI/GameScreen.cpp +++ b/UI/GameScreen.cpp @@ -491,7 +491,7 @@ ScreenRenderFlags GameScreen::render(ScreenRenderMode mode) { if (info->saveDataSize) { btnDeleteSaveData_->SetVisibility(UI::V_VISIBLE); } - if (info->pic0.texture || info->pic1.texture) { + if (info->pic1.texture) { btnSetBackground_->SetVisibility(UI::V_VISIBLE); } } @@ -503,7 +503,7 @@ ScreenRenderFlags GameScreen::render(ScreenRenderMode mode) { } } - if (info->Ready(GameInfoFlags::PIC0)) { + if (info->Ready(GameInfoFlags::PIC0) && info->pic0.texture) { // Draw PIC0 as an overlay. bool draw = true; @@ -674,8 +674,6 @@ void SetBackgroundPopupScreen::update() { GameInfoTex *pic = nullptr; if (info->pic1.dataLoaded && info->pic1.data.size()) { pic = &info->pic1; - } else if (info->pic0.dataLoaded && info->pic0.data.size()) { - pic = &info->pic0; } if (pic) { diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index d6648df1ce..950123ae4b 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -1454,7 +1454,7 @@ bool MainScreen::DrawBackgroundFor(UIContext &dc, const Path &gamePath, float pr dc.RebindTexture(); // Let's not bother if there's no picture. - if (!ginfo->Ready(GameInfoFlags::PIC1) || (!ginfo->pic1.texture && !ginfo->pic0.texture)) { + if (!ginfo->Ready(GameInfoFlags::PIC1) || !ginfo->pic1.texture) { return false; } } else { diff --git a/UI/MiscScreens.cpp b/UI/MiscScreens.cpp index 80b2202453..8e489904ea 100644 --- a/UI/MiscScreens.cpp +++ b/UI/MiscScreens.cpp @@ -250,7 +250,7 @@ private: // Wait for it to load. It might be the next one. break; } - if (ginfo && (ginfo->pic1.texture || ginfo->pic0.texture)) { + if (ginfo && ginfo->pic1.texture) { nextIndex_ = index; nextT_ = t + INTERVAL; break;