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) |
---|
-
SDL2_image-2.0.
old new 280 280 281 281 return surface; 282 282 } 283 #if defined(MAC_OS_X_VERSION_10_5) 283 284 static SDL_Surface* Create_SDL_Surface_From_CGImage_Index(CGImageRef image_ref) 284 285 { 285 286 size_t w = CGImageGetWidth(image_ref); … … 331 332 } 332 333 return surface; 333 334 } 335 #endif 334 336 static SDL_Surface* Create_SDL_Surface_From_CGImage(CGImageRef image_ref) 335 337 { 338 #if defined(MAC_OS_X_VERSION_10_5) 336 339 CGColorSpaceRef color_space = CGImageGetColorSpace(image_ref); 337 340 if (CGColorSpaceGetModel(color_space) == kCGColorSpaceModelIndexed) { 338 341 return Create_SDL_Surface_From_CGImage_Index(image_ref); 339 342 } else { 340 343 return Create_SDL_Surface_From_CGImage_RGB(image_ref); 341 344 } 345 #else 346 return Create_SDL_Surface_From_CGImage_RGB(image_ref); 347 #endif 342 348 } 343 349 344 350