Savedata dialog: Draw icons over black, with alpha blending

The PSP blends save icons over a black background, so their transparent
parts come out black. 0a5fa27957 turned blending off instead, which is
wrong for icons that rely on it. Revert that, and draw a black rectangle
under each icon. Fixes #22280.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-09-29 13:21:24 -06:00
1 parent 0c6a28fe11
commit 1288c294fd
3 files changed
+4 -10

No files matched your search

+4 -3
View File
@@ -412,7 +412,6 @@ void PSPSaveDialog::DisplaySaveList(bool canMove) {
for (int displayCount = 0; displayCount < param.GetFilenameCount(); displayCount++) {
PPGeImageStyle imageStyle = FadedImageStyle();
imageStyle.alphaBlend = false;
auto fileInfo = param.GetFileInfo(displayCount);
if (fileInfo.size == 0 && fileInfo.texture && fileInfo.texture->IsValid())
@@ -449,6 +448,8 @@ void PSPSaveDialog::DisplaySaveList(bool canMove) {
pad = (w - scaledW) / 2;
w = scaledW;
// The PSP draws save icons over black, so their transparent parts come out black (#22280).
PPGeDrawRect(x + pad, y, x + pad + w, y + h, CalcFadedColor(0xFF000000));
PPGeDrawImage(x + pad, y, w, h, 0, 0, 1, 1, tw, th, imageStyle);
} else {
PPGeDrawRect(x, y, x + w, y + h, 0x88666666);
@@ -476,8 +477,6 @@ void PSPSaveDialog::DisplaySaveList(bool canMove) {
void PSPSaveDialog::DisplaySaveIcon(bool checkExists) {
std::lock_guard<std::mutex> guard(paramLock);
PPGeImageStyle imageStyle = FadedImageStyle();
imageStyle.alphaBlend = false;
auto curSave = param.GetFileInfo(currentSelectedSave);
if (curSave.size == 0 && checkExists)
@@ -499,6 +498,8 @@ void PSPSaveDialog::DisplaySaveIcon(bool checkExists) {
int scaledW = (int)(tw * scale);
x += (w - scaledW) / 2;
w = scaledW;
// Over black, as in DisplaySaveList.
PPGeDrawRect(x, y, x + w, y + h, CalcFadedColor(0xFF000000));
} else {
PPGeDisableTexture();
}
-6
View File
@@ -1299,16 +1299,10 @@ void PPGeDrawImage(ImageID atlasImage, float x, float y, float w, float h, const
void PPGeDrawImage(float x, float y, float w, float h, float u1, float v1, float u2, float v2, int tw, int th, const PPGeImageStyle &style) {
if (!dlPtr)
return;
if (!style.alphaBlend) {
WriteCmd(GE_CMD_ALPHABLENDENABLE, 0);
}
BeginVertexData();
Vertex(x, y, u1, v1, tw, th, style.color);
Vertex(x + w, y + h, u2, v2, tw, th, style.color);
EndVertexDataAndDraw(GE_PRIM_RECTANGLES);
if (!style.alphaBlend) {
WriteCmd(GE_CMD_ALPHABLENDENABLE, 1);
}
}
void PPGeSetDefaultTexture()
-1
View File
@@ -85,7 +85,6 @@ struct PPGeStyle {
struct PPGeImageStyle {
uint32_t color = 0xFFFFFFFF;
bool alphaBlend = true;
};
// Get the metrics of the bounding box of the text without changing the buffer or state.