@@ -13,7 +13,7 @@ unsigned char *Win32GetClipboardImageData(int *width, int *height, unsigned long
1313#include <stdlib.h>
1414#include <assert.h>
1515
16- // NOTE: These search for architecture is taken from "Windows .h", and it's necessary if we really don't wanna import windows.h
16+ // NOTE: These search for architecture is taken from "windows .h", and it's necessary to avoid including windows.h
1717// and still make it compile on msvc, because import indirectly importing "winnt.h" (e.g. <minwindef.h>) can cause problems is these are not defined.
1818#if !defined(_X86_ ) && !defined(_68K_ ) && !defined(_MPPC_ ) && !defined(_IA64_ ) && !defined(_AMD64_ ) && !defined(_ARM_ ) && !defined(_ARM64_ ) && !defined(_ARM64EC_ ) && defined(_M_IX86 )
1919 #define _X86_
@@ -306,16 +306,15 @@ static int GetPixelDataOffset(BITMAPINFOHEADER bih)
306306 const unsigned int rgbaSize = sizeof (RGBQUAD );
307307
308308 // NOTE: biSize specifies the number of bytes required by the structure
309- // We expect to always be 40 because it should be packed
309+ // It's expected to be always 40 because it should be packed
310310 if ((bih .biSize == 40 ) && (sizeof (BITMAPINFOHEADER ) == 40 ))
311311 {
312312 // NOTE: biBitCount specifies the number of bits per pixel
313313 // Might exist some bit masks *after* the header and *before* the pixel offset
314- // we're looking, but only if we have more than
315- // 8 bits per pixel, so we need to ajust for that
314+ // we're looking, but only if more than 8 bits per pixel, so it needs to be ajusted for that
316315 if (bih .biBitCount > 8 )
317316 {
318- // If (bih.biCompression == BI_RGB) we should NOT offset more
317+ // If (bih.biCompression == BI_RGB) no need to be offset more
319318
320319 if (bih .biCompression == BI_BITFIELDS ) offset += 3 * rgbaSize ;
321320 else if (bih .biCompression == BI_ALPHABITFIELDS ) offset += 4 * rgbaSize ; // Not widely supported, but valid
0 commit comments