mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-01 12:07:31 +01:00
Use one UI drop shadow for text and atlas images, fix Windows build
Text and the SVG button images are mixed on screen, so they now share UIDropShadowParams (3 UI units of blur, 0.66 intensity, no offset, the atlas's existing look) instead of the text having its own. draw_text.cpp included <windows.h> directly, whose min/max macros broke the std::max calls added here. Include CommonWindows.h instead. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
fcfac13643
commit
dea182f1d8
7 files changed
+24
-24
No files matched your search
@@ -20,6 +20,17 @@
|
||||
|
||||
#include "Common/Render/DropShadow.h"
|
||||
|
||||
// In UI units.
|
||||
static constexpr float UI_SHADOW_RADIUS = 3.0f;
|
||||
static constexpr float UI_SHADOW_INTENSITY = 0.66f;
|
||||
|
||||
DropShadowParams UIDropShadowParams(float pixelsPerUnit) {
|
||||
DropShadowParams params;
|
||||
params.radius = std::max(1, (int)(UI_SHADOW_RADIUS * pixelsPerUnit));
|
||||
params.intensity = UI_SHADOW_INTENSITY;
|
||||
return params;
|
||||
}
|
||||
|
||||
void CompositeDropShadow(const u32 *src, int w, int h, u32 *dst, int dstStride, const DropShadowParams ¶ms) {
|
||||
const int radius = std::max(1, params.radius);
|
||||
const int pad = params.Padding();
|
||||
|
||||
Reference in new issue
Block a user