From 5d61a10ca507e46a35346d07c5e20bac488538bd Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 16 Aug 2007 06:20:51 +0000 Subject: [PATCH] Fixed a few compiler warnings. Added SDL_blit_copy.c to the Visual C++ project The SSE and MMX intrinsics don't compile on Visual Studio yet... --- VisualC/SDL/SDL.vcproj | 8 ++++++++ src/video/SDL_blit.c | 7 ++++--- src/video/SDL_blit.h | 1 + src/video/SDL_blit_copy.c | 1 + 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/VisualC/SDL/SDL.vcproj b/VisualC/SDL/SDL.vcproj index 4e742b73f..76d298c29 100644 --- a/VisualC/SDL/SDL.vcproj +++ b/VisualC/SDL/SDL.vcproj @@ -416,6 +416,14 @@ RelativePath="..\..\src\video\SDL_blit_A.c" > + + + + diff --git a/src/video/SDL_blit.c b/src/video/SDL_blit.c index ffd74f04c..cbc7e3f1f 100644 --- a/src/video/SDL_blit.c +++ b/src/video/SDL_blit.c @@ -139,10 +139,11 @@ SDL_ChooseBlitFunc(SDL_BlitEntry * entries, int count) static Uint32 features = 0xffffffff; if (features == 0xffffffff) { + const char *override = SDL_getenv("SDL_BLIT_FEATURES"); + features = SDL_BLIT_ANY; - /* Provide an override for testing .. */ - const char *override = SDL_getenv("SDL_BLIT_FEATURES"); + /* Allow an override for testing .. */ if (override) { SDL_sscanf(override, "%u", &features); } else { @@ -152,7 +153,7 @@ SDL_ChooseBlitFunc(SDL_BlitEntry * entries, int count) if (SDL_HasSSE()) { features |= SDL_BLIT_SSE; } - if (SDL_HasAltivec()) { + if (SDL_HasAltiVec()) { if (SDL_UseAltivecPrefetch()) { features |= SDL_BLIT_ALTIVEC_PREFETCH; } else { diff --git a/src/video/SDL_blit.h b/src/video/SDL_blit.h index 8795b2b08..e4f5726b3 100644 --- a/src/video/SDL_blit.h +++ b/src/video/SDL_blit.h @@ -31,6 +31,7 @@ #include #endif +#include "SDL_cpuinfo.h" #include "SDL_endian.h" /* The structure passed to the low level blit functions */ diff --git a/src/video/SDL_blit_copy.c b/src/video/SDL_blit_copy.c index 01be9ecc5..dbd62d204 100644 --- a/src/video/SDL_blit_copy.c +++ b/src/video/SDL_blit_copy.c @@ -21,6 +21,7 @@ */ #include "SDL_config.h" +#include "SDL_cpuinfo.h" #include "SDL_video.h" #include "SDL_blit.h" #include "SDL_blit_copy.h"