From 8d22bcfcad01fd94ecf5e4b8c27f75b00d2b9a5f Mon Sep 17 00:00:00 2001 From: criss Date: Mon, 23 Feb 2026 22:26:22 +0100 Subject: [PATCH] win32 clipbaord: fix for BI_ALPHABITFIELDS narrow support --- src/external/win32_clipboard.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/external/win32_clipboard.h b/src/external/win32_clipboard.h index 1cb05457d..8ff56c02c 100644 --- a/src/external/win32_clipboard.h +++ b/src/external/win32_clipboard.h @@ -317,7 +317,9 @@ static int GetPixelDataOffset(BITMAPINFOHEADER bih) // If (bih.biCompression == BI_RGB) no need to be offset more if (bih.biCompression == BI_BITFIELDS) offset += 3*rgbaSize; - else if (bih.biCompression == BI_ALPHABITFIELDS) offset += 4*rgbaSize; // Not widely supported, but valid +#if defined(_WIN32_WCE) && _WIN32_WCE >= 0x0400 // BI_ALPHABITFIELDS is supported only on Windows CE 4.0+ + else if (bih.biCompression == BI_ALPHABITFIELDS) offset += 4 * rgbaSize; // Not widely supported, but valid +#endif } }