mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: common: imagelib: fix incorrect check for big endian pixel formats
This commit is contained in:
@@ -440,8 +440,8 @@ qboolean Image_SaveBMP( const char *name, rgbdata_t *pix )
|
||||
else
|
||||
{
|
||||
// 24 bit
|
||||
qboolean be = !!( pix->type & (PF_BGR_24|PF_BGRA_32) ); // is it big endian RGB?
|
||||
|
||||
qboolean be = ImageBigEndian( pix->type );
|
||||
|
||||
pbBmpBits[i*pixel_size+(be?2:0)] = pb[x*pixel_size+2];
|
||||
pbBmpBits[i*pixel_size+(be?1:1)] = pb[x*pixel_size+1];
|
||||
pbBmpBits[i*pixel_size+(be?0:2)] = pb[x*pixel_size+0];
|
||||
|
||||
Reference in New Issue
Block a user