From 4ef0a32fdc91d39b6f332c2a962907dc802ed804 Mon Sep 17 00:00:00 2001 From: Holmes Futrell Date: Fri, 18 Jul 2008 18:45:36 +0000 Subject: [PATCH] Changed format of video texture to something compatible with iPhone ... a better solution is probably needed. Also set blending mode of video texture to none. --- src/SDL_compat.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/SDL_compat.c b/src/SDL_compat.c index 0d29b44d4..c7e6f193c 100644 --- a/src/SDL_compat.c +++ b/src/SDL_compat.c @@ -521,14 +521,18 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags) SDL_VideoTexture = SDL_CreateTexture(desired_format, SDL_TEXTUREACCESS_STREAMING, width, height); + if (!SDL_VideoTexture) { SDL_VideoTexture = - SDL_CreateTexture(SDL_PIXELFORMAT_RGB888, + SDL_CreateTexture(SDL_PIXELFORMAT_ABGR8888, SDL_TEXTUREACCESS_STREAMING, width, height); } if (!SDL_VideoTexture) { return NULL; } + + SDL_SetTextureBlendMode(SDL_VideoTexture, SDL_TEXTUREBLENDMODE_NONE); + /* Create the screen surface */ SDL_VideoSurface = CreateVideoSurface(SDL_VideoTexture);