comparison 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
comparison
equal deleted inserted replaced
5272:93ea62a5ba8f 5273:c5a04f3c3908
272 } 272 }
273 273
274 /* Find the first format without an alpha channel */ 274 /* Find the first format without an alpha channel */
275 *format = info.texture_formats[0]; 275 *format = info.texture_formats[0];
276 for (i = 0; i < info.num_texture_formats; ++i) { 276 for (i = 0; i < info.num_texture_formats; ++i) {
277 if (!SDL_ISPIXELFORMAT_ALPHA(info.texture_formats[i])) { 277 if (!SDL_ISPIXELFORMAT_FOURCC(info.texture_formats[i]) &&
278 !SDL_ISPIXELFORMAT_ALPHA(info.texture_formats[i])) {
278 *format = info.texture_formats[i]; 279 *format = info.texture_formats[i];
279 break; 280 break;
280 } 281 }
281 } 282 }
282 283