Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed bug 1225 - Altivec blitters broken due to SDL_PixelFormat
Browse files Browse the repository at this point in the history
bastien.bouclet@gmail.com 2011-06-13 05:50:58 PDT

Static pixel format initialization has not been updated to reflect header
changes in SDL_blit_N.c

The attached patch fixes Altivec support for me. altivec.h is needed for some
systems.
  • Loading branch information
slouken committed Jan 7, 2012
1 parent 66243a7 commit 87f1b90
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/video/SDL_blit_A.c
Expand Up @@ -498,9 +498,10 @@ calc_swizzle32(const SDL_PixelFormat * srcfmt, const SDL_PixelFormat * dstfmt)
/* ARGB */
const static struct SDL_PixelFormat default_pixel_format = {
0, NULL, 0, 0,
{0, 0},
0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000,
0, 0, 0, 0,
16, 8, 0, 24,
0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000,
0, NULL
};
if (!srcfmt) {
Expand Down
6 changes: 5 additions & 1 deletion src/video/SDL_blit_N.c
Expand Up @@ -28,6 +28,9 @@
/* Functions to blit from N-bit surfaces to other surfaces */

#if SDL_ALTIVEC_BLITTERS
#ifdef HAVE_ALTIVEC_H
#include <altivec.h>
#endif
#define assert(X)
#ifdef __MACOSX__
#include <sys/sysctl.h>
Expand Down Expand Up @@ -108,9 +111,10 @@ calc_swizzle32(const SDL_PixelFormat * srcfmt, const SDL_PixelFormat * dstfmt)
/* ARGB */
const static const struct SDL_PixelFormat default_pixel_format = {
0, NULL, 0, 0,
{0, 0},
0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000,
0, 0, 0, 0,
16, 8, 0, 24,
0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000,
0, NULL
};
if (!srcfmt) {
Expand Down

0 comments on commit 87f1b90

Please sign in to comment.