Skip to content

Commit

Permalink
Added support for webp on big endian systems
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Mar 2, 2013
1 parent 4b400c6 commit 914a0a4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion IMG_webp.c
Expand Up @@ -223,10 +223,17 @@ SDL_Surface *IMG_LoadWEBP_RW(SDL_RWops *src)
}

/* Check if it's ok !*/
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
Bmask = 0xFF000000;
Gmask = 0x00FF0000;
Rmask = 0x0000FF00;
Amask = features.has_alpha?0x000000FF:0;
#else
Rmask = 0x000000FF;
Gmask = 0x0000FF00;
Bmask = 0x00FF0000;
Amask = features.has_alpha?0xFF000001:0;
Amask = features.has_alpha?0xFF000000:0;
#endif

surface = SDL_CreateRGBSurface(SDL_SWSURFACE,
features.width, features.height,
Expand Down

0 comments on commit 914a0a4

Please sign in to comment.