Skip to content

Commit

Permalink
graphics/freeimage: fix endianness issues better
Browse files Browse the repository at this point in the history
  • Loading branch information
pkubaj committed Sep 13, 2022
1 parent ea1d2da commit 93f1d97
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion graphics/freeimage/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PORTNAME= freeimage
PORTVERSION= 3.18.0
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= graphics
MASTER_SITES= SF/${PORTNAME}/Source%20Distribution/${PORTVERSION}
DISTNAME= FreeImage${PORTVERSION:S/.//g}
Expand Down
10 changes: 9 additions & 1 deletion graphics/freeimage/files/patch-Source_FreeImage_PluginDDS.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- Source/FreeImage/PluginDDS.cpp.orig 2018-11-18 16:17:59 UTC
+++ Source/FreeImage/PluginDDS.cpp
@@ -356,14 +356,6 @@ SwapHeader(DDSHEADER *header) {
@@ -356,14 +356,14 @@ SwapHeader(DDSHEADER *header) {
for(int i=0; i<11; i++) {
SwapLong(&header->surfaceDesc.dwReserved1[i]);
}
Expand All @@ -12,6 +12,14 @@
- SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwGBitMask);
- SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwBBitMask);
- SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwRGBAlphaBitMask);
+ SwapLong(&header->surfaceDesc.ddspf.dwSize);
+ SwapLong(&header->surfaceDesc.ddspf.dwFlags);
+ SwapLong(&header->surfaceDesc.ddspf.dwFourCC);
+ SwapLong(&header->surfaceDesc.ddspf.dwRGBBitCount);
+ SwapLong(&header->surfaceDesc.ddspf.dwRBitMask);
+ SwapLong(&header->surfaceDesc.ddspf.dwGBitMask);
+ SwapLong(&header->surfaceDesc.ddspf.dwBBitMask);
+ SwapLong(&header->surfaceDesc.ddspf.dwRGBAlphaBitMask);
SwapLong(&header->surfaceDesc.ddsCaps.dwCaps1);
SwapLong(&header->surfaceDesc.ddsCaps.dwCaps2);
SwapLong(&header->surfaceDesc.ddsCaps.dwReserved[0]);

0 comments on commit 93f1d97

Please sign in to comment.