X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Flibgame%2Fsdl.c;h=f805ddfd6c1ef5a213a805026bd935648478aea1;hp=1b8d139e5031369122ac84f9afcb450ab934adfe;hb=6d17734e8b92345bb044aa7f0b48a10290692bec;hpb=a2698b3b66ff48d2bccb5015384e09d8110df6eb diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index 1b8d139e..f805ddfd 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -2254,14 +2254,8 @@ Bitmap *SDLLoadImage(char *filename) UPDATE_BUSY_STATE(); /* create native non-transparent surface for current image */ - if ((new_bitmap->surface = SDLGetNativeSurface(sdl_image_tmp)) == NULL) - Error(ERR_EXIT, "SDLGetNativeSurface() failed"); - - /* remove alpha channel from native non-transparent surface, if defined */ - SDLSetAlpha(new_bitmap->surface, FALSE, 0); - - /* remove transparent color from native non-transparent surface, if defined */ - SDL_SetColorKey(new_bitmap->surface, UNSET_TRANSPARENT_PIXEL, 0); + if ((new_bitmap->surface = SDLGetOpaqueSurface(sdl_image_tmp)) == NULL) + Error(ERR_EXIT, "SDLGetOpaqueSurface() failed"); print_timestamp_time("SDLGetNativeSurface (opaque)");