Improve display of homebrew without an icon in the game browser

This commit is contained in:
Henrik Rydgård
2026-02-10 11:06:57 +01:00
parent ab437becf8
commit 2bc43810a8
8 changed files with 28 additions and 22 deletions
+8 -3
View File
@@ -295,7 +295,7 @@ void GameButton::Draw(UIContext &dc) {
bool drawBackground = true;
switch (ginfo->fileType) {
case IdentifiedFileType::PSP_ELF: imageIcon = ImageID("I_DEBUGGER"); drawBackground = false; break;
case IdentifiedFileType::UNKNOWN_ELF: imageIcon = ImageID("I_DEBUGGER"); break;
case IdentifiedFileType::UNKNOWN_ELF: imageIcon = ImageID("I_CROSS"); drawBackground = false; break;
case IdentifiedFileType::PPSSPP_GE_DUMP: imageIcon = ImageID("I_DISPLAY"); break;
case IdentifiedFileType::PSX_ISO:
case IdentifiedFileType::PSP_PS1_PBP: imageIcon = ImageID("I_PSX_ISO"); break;
@@ -325,8 +325,13 @@ void GameButton::Draw(UIContext &dc) {
}
}
if (ginfo->Ready(GameInfoFlags::ICON) && ginfo->icon.texture && drawBackground) {
texture = ginfo->icon.texture;
if (ginfo->Ready(GameInfoFlags::ICON)) {
if (ginfo->icon.texture && drawBackground) {
texture = ginfo->icon.texture;
} else if (drawBackground) {
// No icon, but drawBackground is set. Let's show a plain icon.
imageIcon = ImageID("I_APP");
}
}
int x = bounds_.x;