From 0a5fa27957c5ffd34c4066df24cc353c750dc8f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 21 Sep 2026 10:41:35 -0600 Subject: [PATCH] Disable alpha for save/load icons in sceUtility UI --- Core/Dialog/PSPSaveDialog.cpp | 6 ++++-- Core/Util/PPGeDraw.cpp | 6 ++++++ Core/Util/PPGeDraw.h | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Core/Dialog/PSPSaveDialog.cpp b/Core/Dialog/PSPSaveDialog.cpp index 9f2401baeb..f86aad4eb5 100755 --- a/Core/Dialog/PSPSaveDialog.cpp +++ b/Core/Dialog/PSPSaveDialog.cpp @@ -412,6 +412,7 @@ 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()) @@ -472,10 +473,11 @@ void PSPSaveDialog::DisplaySaveList(bool canMove) { } } -void PSPSaveDialog::DisplaySaveIcon(bool checkExists) -{ +void PSPSaveDialog::DisplaySaveIcon(bool checkExists) { std::lock_guard guard(paramLock); PPGeImageStyle imageStyle = FadedImageStyle(); + imageStyle.alphaBlend = false; + auto curSave = param.GetFileInfo(currentSelectedSave); if (curSave.size == 0 && checkExists) diff --git a/Core/Util/PPGeDraw.cpp b/Core/Util/PPGeDraw.cpp index 94da3cc08b..e0b39413ea 100644 --- a/Core/Util/PPGeDraw.cpp +++ b/Core/Util/PPGeDraw.cpp @@ -1299,10 +1299,16 @@ 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() diff --git a/Core/Util/PPGeDraw.h b/Core/Util/PPGeDraw.h index cf57442d53..ea0ef8e2fe 100644 --- a/Core/Util/PPGeDraw.h +++ b/Core/Util/PPGeDraw.h @@ -85,6 +85,7 @@ 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.