I assume when you wrote SDL_LoadBMP you just assumed that only LE machines
would create .bmp files? I say this because of lines like src/SDL_bmp.c:117
and others.
Would it be appropriate to check the return value of SDL_CalculateEndian(),
and then use LE and BE appropriately?
m.–
“Plausibility is just what it does have, Crito, rather than truth.”
– Socrates, Euthydemus
I assume when you wrote SDL_LoadBMP you just assumed that only LE machines
would create .bmp files? I say this because of lines like src/SDL_bmp.c:117
and others.
Would it be appropriate to check the return value of SDL_CalculateEndian(),
and then use LE and BE appropriately?
Or even use the predefined kernel macros… st_le32, e.g.
I assume when you wrote SDL_LoadBMP you just assumed that only LE machines
would create .bmp files? I say this because of lines like src/SDL_bmp.c:117
and others.
Big endian machines that write BMP files should write them in little-endian
format. This is the BMP file format specification. See the code in
SDL_SaveBMP()