changeset 4:caaa54391116

Fix Squish wrapping on 64-bit systems For some reason the two Squish libraries have different method names so we need to DllImport a different EntryPoint Also removes the Decompress function, as we don't call it.
author IBBoard <dev@ibboard.co.uk>
date Sun, 16 Oct 2016 20:43:15 +0100
parents 853a4483c051
children d2e49291986e
files SquishWrapper.cs
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/SquishWrapper.cs	Sun Oct 16 20:35:11 2016 +0100
+++ b/SquishWrapper.cs	Sun Oct 16 20:43:15 2016 +0100
@@ -64,16 +64,12 @@
 		{
             [DllImport("squishinterface_x86.dll")]
 			internal static extern unsafe void CompressImage( byte* rgba, int width, int height, byte* blocks, int flags );
-            [DllImport("squishinterface_x86.dll")]
-			internal static	extern unsafe void DecompressImage( byte* rgba, int width, int height, byte* blocks, int flags );
 		}
    
 		private sealed class SquishInterface_64
 		{
-			[DllImport("squishinterface_x64.dll")]
+			[DllImport("squishinterface_x64.dll", EntryPoint="SquishCompressImage")]
 			internal static extern unsafe void CompressImage( byte* rgba, int width, int height, byte* blocks, int flags );
-			[DllImport("squishinterface_x64.dll")]
-			internal static	extern unsafe void DecompressImage( byte* rgba, int width, int height, byte* blocks, int flags );
 		}
 
 		private static unsafe void	CallCompressImage( byte[] rgba, int width, int height, byte[] blocks, int flags )