File ClanLib-0.6.5-byteorder.patch of Package failed_clanlib

--- Sources/API/Display/Display/pixeldata.h
+++ Sources/API/Display/Display/pixeldata.h
@@ -167,24 +167,24 @@
 			case 15:
 			case 16:
 				{
-					unsigned short *ptr =
-						(unsigned short *) m_provider->get_data();
+					unsigned char *ptr =
+						(unsigned char *) m_provider->get_data();
 
 					for (int x=0; x<width; x++)
 					{
-						dest[x] = (unsigned char) (ptr[x+y*width]&255);
+						dest[x] = ptr[(x+y*width)*2];
 					}
 				}
 				return;
 
 			case 32:
 				{
-					unsigned int *ptr =
-						(unsigned int *) m_provider->get_data();
+					unsigned char *ptr =
+						(unsigned char *) m_provider->get_data();
 
 					for (int x=0; x<width; x++)
 					{
-						dest[x] = (unsigned char) (ptr[x+y*width]&255);
+						dest[x] = ptr[(x+y*width)*4];
 					}
 				}
 				return;
openSUSE Build Service is sponsored by