diff src/video/SDL_video.c @ 5273:c5a04f3c3908

Fixed a crash caused by the 1.2 code path getting a YV12 texture. :)
author Sam Lantinga <slouken@libsdl.org>
date Sat, 12 Feb 2011 08:17:58 -0800
parents b530ef003506
children bad04e4710f6
line wrap: on
line diff
--- a/src/video/SDL_video.c	Sat Feb 12 08:17:37 2011 -0800
+++ b/src/video/SDL_video.c	Sat Feb 12 08:17:58 2011 -0800
@@ -274,7 +274,8 @@
     /* Find the first format without an alpha channel */
     *format = info.texture_formats[0];
     for (i = 0; i < info.num_texture_formats; ++i) {
-        if (!SDL_ISPIXELFORMAT_ALPHA(info.texture_formats[i])) {
+        if (!SDL_ISPIXELFORMAT_FOURCC(info.texture_formats[i]) &&
+            !SDL_ISPIXELFORMAT_ALPHA(info.texture_formats[i])) {
             *format = info.texture_formats[i];
             break;
         }