From 0f03367eb0758f0900f6b8e212ac2e45a44f1c7c Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 19 Jun 2012 13:50:14 -0400 Subject: [PATCH] Fixed compiling with Visual Studio --- VisualC/SDL/SDL_VS2008.vcproj | 8 ++++++++ VisualC/SDL/SDL_VS2010.vcxproj | 4 +++- src/render/direct3d/SDL_render_d3d.c | 2 +- src/render/software/SDL_render_sw.c | 1 - 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/VisualC/SDL/SDL_VS2008.vcproj b/VisualC/SDL/SDL_VS2008.vcproj index 57e49bad2..7a0f330f4 100644 --- a/VisualC/SDL/SDL_VS2008.vcproj +++ b/VisualC/SDL/SDL_VS2008.vcproj @@ -1000,6 +1000,14 @@ RelativePath="..\..\src\video\SDL_RLEaccel_c.h" > + + + + diff --git a/VisualC/SDL/SDL_VS2010.vcxproj b/VisualC/SDL/SDL_VS2010.vcxproj index 782526501..a42af5107 100644 --- a/VisualC/SDL/SDL_VS2010.vcxproj +++ b/VisualC/SDL/SDL_VS2010.vcxproj @@ -273,6 +273,7 @@ + @@ -356,6 +357,7 @@ + @@ -441,4 +443,4 @@ - + \ No newline at end of file diff --git a/src/render/direct3d/SDL_render_d3d.c b/src/render/direct3d/SDL_render_d3d.c index b0d8b4bc2..b3914a457 100755 --- a/src/render/direct3d/SDL_render_d3d.c +++ b/src/render/direct3d/SDL_render_d3d.c @@ -1320,7 +1320,7 @@ D3D_RenderCopyEx(SDL_Renderer * renderer, SDL_Texture * texture, // Rotate and translate ID3DXMatrixStack_Push(data->matrixStack); ID3DXMatrixStack_LoadIdentity(data->matrixStack); - ID3DXMatrixStack_RotateYawPitchRoll(data->matrixStack, 0.0, 0.0, M_PI * (float) angle / 180.0f); + ID3DXMatrixStack_RotateYawPitchRoll(data->matrixStack, 0.0, 0.0, (float)(M_PI * (float) angle / 180.0f)); ID3DXMatrixStack_Translate(data->matrixStack, (float)dstrect->x + centerx, (float)dstrect->y + centery, (float)0.0); IDirect3DDevice9_SetTransform(data->device, D3DTS_VIEW, (D3DMATRIX*)ID3DXMatrixStack_GetTop(data->matrixStack)); diff --git a/src/render/software/SDL_render_sw.c b/src/render/software/SDL_render_sw.c index 6cac41d6e..4f4d38fb5 100755 --- a/src/render/software/SDL_render_sw.c +++ b/src/render/software/SDL_render_sw.c @@ -521,7 +521,6 @@ SW_RenderCopyEx(SDL_Renderer * renderer, SDL_Texture * texture, SDL_Surface *src = (SDL_Surface *) texture->driverdata; SDL_Rect final_rect = *dstrect, tmp_rect; SDL_Surface *surface_rotated, *surface_scaled; - SDL_Point final_rect_center; Uint32 colorkey; int retval, dstwidth, dstheight, abscenterx, abscentery; double cangle, sangle, px, py, p1x, p1y, p2x, p2y, p3x, p3y, p4x, p4y;