Ticket #52210: SDL2_image-2.0.2_OSX_104.patch

File SDL2_image-2.0.2_OSX_104.patch, 909 bytes (added by miniupnp (Thomas BERNARD), 6 years ago)

bonus : patch for SDL2_image to build under Tiger

  • SDL2_image-2.0.

    old new  
    280280
    281281    return surface;
    282282}
     283#if defined(MAC_OS_X_VERSION_10_5)
    283284static SDL_Surface* Create_SDL_Surface_From_CGImage_Index(CGImageRef image_ref)
    284285{
    285286    size_t w = CGImageGetWidth(image_ref);
     
    331332    }
    332333    return surface;
    333334}
     335#endif
    334336static SDL_Surface* Create_SDL_Surface_From_CGImage(CGImageRef image_ref)
    335337{
     338#if defined(MAC_OS_X_VERSION_10_5)
    336339    CGColorSpaceRef color_space = CGImageGetColorSpace(image_ref);
    337340    if (CGColorSpaceGetModel(color_space) == kCGColorSpaceModelIndexed) {
    338341        return Create_SDL_Surface_From_CGImage_Index(image_ref);
    339342    } else {
    340343        return Create_SDL_Surface_From_CGImage_RGB(image_ref);
    341344    }
     345#else
     346    return Create_SDL_Surface_From_CGImage_RGB(image_ref);
     347#endif
    342348}
    343349
    344350