We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 904

Summary: SDL_Surface conversion does not set up blend mode when converting a color key
Product: SDL Reporter: Mason Wheeler <masonwheeler>
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: Other   
OS: Windows Vista   

Description Mason Wheeler 2009-12-14 19:03:47 UTC
--- C:\Users\Mason\AppData\Local\Temp\SDL_surface.-revBASE.svn001.tmp.c	2009-12-14 18:59:09.000000000 -0800
+++ C:\Users\Mason\Documents\SDL-1.3\SDL-1.3.0-4423\src\video\SDL_surface.c	2009-12-14 18:32:46.000000000 -0800
@@ -842,12 +842,14 @@
         SDL_GetRGBA(surface->map->info.colorkey, surface->format, &keyR,
                     &keyG, &keyB, &keyA);
         SDL_SetColorKey(convert, 1,
                         SDL_MapRGBA(convert->format, keyR, keyG, keyB, keyA));
         /* This is needed when converting for 3D texture upload */
         SDL_ConvertColorkeyToAlpha(convert);
+		/*This is needed in SDL_CreateTextureFromSurface*/
+		SDL_SetSurfaceBlendMode(surface, SDL_BLENDMODE_BLEND);
     }
     SDL_SetClipRect(convert, &surface->clip_rect);
 
     /* Enable alpha blending by default if the new surface has an
      * alpha channel or alpha modulation */
     if ((surface->format->Amask && format->Amask) ||
Comment 1 Sam Lantinga 2009-12-14 21:22:09 UTC
This was already fixed in SDL_ConvertColorkeyToAlpha()