Skip to content

Commit

Permalink
Fixes #2529, guard SDL_d3math.* with the proper defines
Browse files Browse the repository at this point in the history
  • Loading branch information
gabomdq committed May 10, 2014
1 parent 536dd01 commit fb38995
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/render/SDL_d3dmath.c
Expand Up @@ -19,6 +19,8 @@
3. This notice may not be removed or altered from any source distribution.
*/
#include "../SDL_internal.h"

#if (SDL_VIDEO_RENDER_D3D || SDL_VIDEO_RENDER_D3D11) && !SDL_RENDER_DISABLED
#include "SDL_stdinc.h"

#include "SDL_d3dmath.h"
Expand Down Expand Up @@ -126,6 +128,9 @@ Float4X4 MatrixRotationZ(float r)
m._33 = 1.0f;
m._44 = 1.0f;
return m;

}

#endif /* (SDL_VIDEO_RENDER_D3D || SDL_VIDEO_RENDER_D3D11) && !SDL_RENDER_DISABLED */

/* vi: set ts=4 sw=4 expandtab: */
3 changes: 3 additions & 0 deletions src/render/SDL_d3dmath.h
Expand Up @@ -20,6 +20,7 @@
*/
#include "../SDL_internal.h"

#if (SDL_VIDEO_RENDER_D3D || SDL_VIDEO_RENDER_D3D11) && !SDL_RENDER_DISABLED

/* Direct3D matrix math functions */

Expand Down Expand Up @@ -66,4 +67,6 @@ Float4X4 MatrixRotationX(float r);
Float4X4 MatrixRotationY(float r);
Float4X4 MatrixRotationZ(float r);

#endif /* (SDL_VIDEO_RENDER_D3D || SDL_VIDEO_RENDER_D3D11) && !SDL_RENDER_DISABLED */

/* vi: set ts=4 sw=4 expandtab: */

0 comments on commit fb38995

Please sign in to comment.