void-packages/srcpkgs/pioneer/patches/endian.patch

20 lines
688 B
Diff

commit b2bfa86a8d01c38a907a837fc58a85577697a6f0
Author: q66 <daniel@octaforge.org>
Date: Sun Jan 5 22:02:18 2020 +0100
Fix big endian build
diff --git src/PngWriter.cpp src/PngWriter.cpp
index 76bfb0e..5908480 100644
--- a/src/PngWriter.cpp
+++ b/src/PngWriter.cpp
@@ -10,7 +10,7 @@ void write_png(FileSystem::FileSourceFS &fs, const std::string &path, const Uint
// Set up the pixel format color masks for RGB(A) byte arrays.
Uint32 rmask, gmask, bmask, amask;
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
- int shift = ((sd.bpp == 3) ? 8 : 0;
+ int shift = (bytes_per_pixel == 3) ? 8 : 0;
rmask = 0xff000000 >> shift;
gmask = 0x00ff0000 >> shift;
bmask = 0x0000ff00 >> shift;