src/video/SDL_video.c
changeset 2785 fa1095d42a5b
parent 2753 0969758c8809
child 2786 6bacfecbf27e
equal deleted inserted replaced
2784:9bbe3bd94be8 2785:fa1095d42a5b
    43 /* On Windows, windows.h defines CreateWindow */
    43 /* On Windows, windows.h defines CreateWindow */
    44 #ifdef CreateWindow
    44 #ifdef CreateWindow
    45 #undef CreateWindow
    45 #undef CreateWindow
    46 #endif
    46 #endif
    47 #endif /* SDL_VIDEO_OPENGL */
    47 #endif /* SDL_VIDEO_OPENGL */
       
    48 
       
    49 /* From SDL_surface.c */
       
    50 extern void SDL_ConvertColorkeyToAlpha(SDL_Surface *surface);
    48 
    51 
    49 /* Available video drivers */
    52 /* Available video drivers */
    50 static VideoBootStrap *bootstrap[] = {
    53 static VideoBootStrap *bootstrap[] = {
    51 #if SDL_VIDEO_DRIVER_COCOA
    54 #if SDL_VIDEO_DRIVER_COCOA
    52     &COCOA_bootstrap,
    55     &COCOA_bootstrap,
  1583                                      SDL_BITSPERPIXEL(format));
  1586                                      SDL_BITSPERPIXEL(format));
  1584                 }
  1587                 }
  1585             }
  1588             }
  1586             dst = SDL_ConvertSurface(surface, dst_fmt, 0);
  1589             dst = SDL_ConvertSurface(surface, dst_fmt, 0);
  1587             if (dst) {
  1590             if (dst) {
       
  1591 				SDL_ConvertColorkeyToAlpha(dst);
  1588                 SDL_UpdateTexture(textureID, NULL, dst->pixels, dst->pitch);
  1592                 SDL_UpdateTexture(textureID, NULL, dst->pixels, dst->pitch);
  1589                 SDL_FreeSurface(dst);
  1593                 SDL_FreeSurface(dst);
  1590             }
  1594             }
  1591             if (dst_fmt->palette) {
  1595             if (dst_fmt->palette) {
  1592                 SDL_FreePalette(dst_fmt->palette);
  1596                 SDL_FreePalette(dst_fmt->palette);