mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 17:27:32 +00:00
Fix macOS pixel format: use ARGB byte order in all raw ScanLine blending
On macOS Cocoa, TBitmap.pf32bit stores pixels in ARGB order
(byte0=A, byte1=R, byte2=G, byte3=B) rather than BGRA used on
Linux/Windows. All raw ScanLine pixel blending and channel mapping
is now guarded with { DARWIN} to use the correct offsets.
Also fix PortAudio library discovery on macOS: probe .dylib names
(including Homebrew paths) before falling through to .so/.dll.
This commit is contained in:
@@ -98,9 +98,15 @@ begin
|
||||
Inc(Row, RR.Left * 4);
|
||||
for X := RR.Left to RR.Right - 1 do
|
||||
begin
|
||||
{$IFDEF DARWIN}
|
||||
Row[1] := Byte((Alpha * R + InvA * Row[1]) div 255);
|
||||
Row[2] := Byte((Alpha * G + InvA * Row[2]) div 255);
|
||||
Row[3] := Byte((Alpha * B + InvA * Row[3]) div 255);
|
||||
{$ELSE}
|
||||
Row[0] := Byte((Alpha * B + InvA * Row[0]) div 255);
|
||||
Row[1] := Byte((Alpha * G + InvA * Row[1]) div 255);
|
||||
Row[2] := Byte((Alpha * R + InvA * Row[2]) div 255);
|
||||
{$ENDIF}
|
||||
Inc(Row, 4);
|
||||
end;
|
||||
end;
|
||||
|
||||
Reference in New Issue
Block a user