Only convert endianness if both src and dest are 16bits SDL-1.2
authorPatrice Mandin <patmandin@gmail.com>
Sat, 16 Sep 2006 09:14:25 +0000
branchSDL-1.2
changeset 3863 4e23720e4278
parent 3862 3c4ccd884117
child 3864 ea2a327b92d7
Only convert endianness if both src and dest are 16bits
src/audio/SDL_audiocvt.c
--- a/src/audio/SDL_audiocvt.c	Fri Sep 15 21:26:36 2006 +0000
+++ b/src/audio/SDL_audiocvt.c	Sat Sep 16 09:14:25 2006 +0000
@@ -1374,7 +1374,7 @@
 
 	/* First filter:  Endian conversion from src to dst */
 	if ( (src_format & 0x1000) != (dst_format & 0x1000)
-	     && ((src_format & 0xff) != 8) ) {
+	     && ((src_format & 0xff) == 16) && ((dst_format & 0xff) == 16)) {
 		cvt->filters[cvt->filter_index++] = SDL_ConvertEndian;
 	}