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 - SDL_Surface conversion does not set up blend mode when converting a color key
Summary: SDL_Surface conversion does not set up blend mode when converting a color key
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: Other Windows Vista
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-14 19:03 UTC by Mason Wheeler
Modified: 2009-12-14 21:22 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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()