# HG changeset patch # User Sam Lantinga # Date 1263585949 0 # Node ID 0d6f520c0eb9db10d969a78c29887885f8ce8498 # Parent 62b6a5b99918e4d3b1e26d8702ae4b307812f6bc Fixed building under Visual Studio diff -r 62b6a5b99918 -r 0d6f520c0eb9 VisualC/SDL/SDL.vcproj --- a/VisualC/SDL/SDL.vcproj Wed Jan 13 19:29:33 2010 +0000 +++ b/VisualC/SDL/SDL.vcproj Fri Jan 15 20:05:49 2010 +0000 @@ -26,7 +26,7 @@ + + + + @@ -236,6 +244,10 @@ > + + @@ -252,6 +264,10 @@ > + + @@ -288,6 +304,10 @@ > + + @@ -304,14 +324,26 @@ > + + + + + + @@ -425,6 +457,14 @@ > + + + + @@ -453,6 +493,10 @@ > + + @@ -561,6 +605,10 @@ > + + @@ -625,6 +673,10 @@ > + + diff -r 62b6a5b99918 -r 0d6f520c0eb9 VisualC/SDL/SDL_VS2008.vcproj --- a/VisualC/SDL/SDL_VS2008.vcproj Wed Jan 13 19:29:33 2010 +0000 +++ b/VisualC/SDL/SDL_VS2008.vcproj Fri Jan 15 20:05:49 2010 +0000 @@ -371,6 +371,10 @@ > + + @@ -608,6 +612,14 @@ > + + + + @@ -816,6 +828,10 @@ > + + diff -r 62b6a5b99918 -r 0d6f520c0eb9 src/SDL_assert.c --- a/src/SDL_assert.c Wed Jan 13 19:29:33 2010 +0000 +++ b/src/SDL_assert.c Fri Jan 15 20:05:49 2010 +0000 @@ -22,6 +22,7 @@ #include "SDL.h" #include "SDL_assert.h" +#include "video/SDL_sysvideo.h" #ifdef _WINDOWS #define WIN32_LEAN_AND_MEAN 1 diff -r 62b6a5b99918 -r 0d6f520c0eb9 src/video/SDL_drawline.c --- a/src/video/SDL_drawline.c Wed Jan 13 19:29:33 2010 +0000 +++ b/src/video/SDL_drawline.c Fri Jan 15 20:05:49 2010 +0000 @@ -28,7 +28,21 @@ SDL_bool draw_end) { if (y1 == y2) { - HLINE(Uint8, DRAW_FASTSETPIXEL1, draw_end); + //HLINE(Uint8, DRAW_FASTSETPIXEL1, draw_end); + int length; + int pitch = (dst->pitch / dst->format->BytesPerPixel); + Uint8 *pixel; + if (x1 <= x2) { + pixel = (Uint8 *)dst->pixels + y1 * pitch + x1; + length = draw_end ? (x2-x1+1) : (x2-x1); + } else { + pixel = (Uint8 *)dst->pixels + y1 * pitch + x2; + if (!draw_end) { + ++pixel; + } + length = draw_end ? (x1-x2+1) : (x1-x2); + } + SDL_memset(pixel, color, length); } else if (x1 == x2) { VLINE(Uint8, DRAW_FASTSETPIXEL1, draw_end); } else if (ABS(x1 - x2) == ABS(y1 - y2)) {