[xiph-cvs] cvs commit: ogg-tools/oggplay configure.in mngplay.c

Ralph Giles giles at xiph.org
Fri Jun 20 11:34:18 PDT 2003



giles       03/06/20 14:34:17

  Modified:    oggplay  configure.in mngplay.c
  Log:
  Give the proper pixel format to SDL based on the host endianness.

Revision  Changes    Path
1.3       +3 -0      ogg-tools/oggplay/configure.in

Index: configure.in
===================================================================
RCS file: /usr/local/cvsroot/ogg-tools/oggplay/configure.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- configure.in	9 Jul 2002 13:24:09 -0000	1.2
+++ configure.in	20 Jun 2003 18:34:17 -0000	1.3
@@ -15,6 +15,9 @@
 dnl Checks for header files.
 AC_HEADER_STDC
 
+dnl Checks for types
+AC_C_BIGENDIAN
+
 dnl check for Simple Direct Media Layer
 AC_CHECK_PROG(HAS_SDL, sdl-config, yes)
 if test "x$HAS_SDL" != "xyes"; then

<p><p>1.3       +5 -3      ogg-tools/oggplay/mngplay.c

Index: mngplay.c
===================================================================
RCS file: /usr/local/cvsroot/ogg-tools/oggplay/mngplay.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mngplay.c	20 Jun 2003 18:21:05 -0000	1.2
+++ mngplay.c	20 Jun 2003 18:34:17 -0000	1.3
@@ -1,7 +1,7 @@
 /*
         mngplay
 
-	$Date: 2003/06/20 18:21:05 $
+	$Date: 2003/06/20 18:34:17 $
 
         Ralph Giles <giles at xiph.org>
 
@@ -127,10 +127,12 @@
         }
 
         /* tell the mng decoder about our bit-depth choice */
-	/* FIXME: SDL wants BGRA on intel, ARGB on ppc. should detect */
-	mng_set_canvasstyle(mng, MNG_CANVAS_BGRA8);
+	/* SDL wants BGRA on intel, ARGB on ppc. */
+#ifdef WORDS_BIGENDIAN
         mng_set_canvasstyle(mng, MNG_CANVAS_ARGB8);
-
+#else
+	mng_set_canvasstyle(mng, MNG_CANVAS_BGRA8);
+#endif
         return MNG_TRUE;
 }
 

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list